diff options
author | Sean Young <sean@mess.org> | 2016-10-31 15:52:21 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-21 12:24:58 -0200 |
commit | d6aca6ea281d88ce1816fd6f5a57889c6ea9392b (patch) | |
tree | c17eddf2bbc107630731bd6b9e20c91ff7240c23 /drivers/media/rc | |
parent | da500033df2b7b532aa04c462ffdc203b9eabde4 (diff) |
[media] redrat3: remove dead code and pointless messages
Cleanup the error logic, removing checks for things that
should be always initialized when the routines are called,
and remove some bogus messages.
[mchehab@s-opensource.com: fix some merge conflicts]
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/redrat3.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 236b686bffd6..09e34a73d663 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -363,11 +363,6 @@ static void redrat3_process_ir_data(struct redrat3_dev *rr3) unsigned int i, sig_size, single_len, offset, val; u32 mod_freq; - if (!rr3) { - pr_err("%s called with no context!\n", __func__); - return; - } - dev = rr3->dev; mod_freq = redrat3_val_to_mod_freq(&rr3->irdata); @@ -693,19 +688,9 @@ out: /* callback function from USB when async USB request has completed */ static void redrat3_handle_async(struct urb *urb) { - struct redrat3_dev *rr3; + struct redrat3_dev *rr3 = urb->context; int ret; - if (!urb) - return; - - rr3 = urb->context; - if (!rr3) { - pr_err("%s called with invalid context!\n", __func__); - usb_unlink_urb(urb); - return; - } - switch (urb->status) { case 0: ret = redrat3_get_ir_data(rr3, urb->actual_length); @@ -1069,8 +1054,6 @@ error: redrat3_delete(rr3, rr3->udev); no_endpoints: - dev_err(dev, "%s: retval = %x", __func__, retval); - return retval; } @@ -1079,9 +1062,6 @@ static void redrat3_dev_disconnect(struct usb_interface *intf) struct usb_device *udev = interface_to_usbdev(intf); struct redrat3_dev *rr3 = usb_get_intfdata(intf); - if (!rr3) - return; - usb_set_intfdata(intf, NULL); rc_unregister_device(rr3->rc); led_classdev_unregister(&rr3->led); |