aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/bt8xx/dst_ca.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/bt8xx/dst_ca.c')
-rw-r--r--drivers/media/pci/bt8xx/dst_ca.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/pci/bt8xx/dst_ca.c b/drivers/media/pci/bt8xx/dst_ca.c
index 8681b9143a35..04d06c564602 100644
--- a/drivers/media/pci/bt8xx/dst_ca.c
+++ b/drivers/media/pci/bt8xx/dst_ca.c
@@ -475,16 +475,14 @@ static int dst_check_ca_pmt(struct dst_state *state, struct ca_msg *p_ca_message
static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg)
{
- int i = 0;
-
- u32 command = 0;
+ int i;
+ u32 command;
struct ca_msg *hw_buffer;
int result = 0;
- if ((hw_buffer = kmalloc(sizeof (struct ca_msg), GFP_KERNEL)) == NULL) {
- dprintk(verbose, DST_CA_ERROR, 1, " Memory allocation failure");
+ hw_buffer = kmalloc(sizeof(*hw_buffer), GFP_KERNEL);
+ if (!hw_buffer)
return -ENOMEM;
- }
dprintk(verbose, DST_CA_DEBUG, 1, " ");
if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) {
@@ -567,7 +565,6 @@ static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long ioct
p_ca_slot_info = kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL);
p_ca_caps = kmalloc(sizeof (struct ca_caps), GFP_KERNEL);
if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) {
- dprintk(verbose, DST_CA_ERROR, 1, " Memory allocation failure");
result = -ENOMEM;
goto free_mem_and_exit;
}