[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>
This commit is contained in:
Sean Young 2016-10-31 15:52:21 -02:00 committed by Mauro Carvalho Chehab
parent da500033df
commit d6aca6ea28

View File

@ -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 @@ static int redrat3_get_ir_data(struct redrat3_dev *rr3, unsigned len)
/* 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 @@ static int redrat3_dev_probe(struct usb_interface *intf,
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);