[media] rtl28xxu: do not return error for unimplemented fe callback
authorAntti Palosaari <crope@iki.fi>
Mon, 17 Sep 2012 18:49:54 +0000 (15:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 27 Sep 2012 18:14:12 +0000 (15:14 -0300)
Use of frontend callback is highly hardware design dependent
and whole callback could be optional in many cases. Returning
error by default when callback is not implemented is stupid.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/dvb-usb-v2/rtl28xxu.c

index 3b98ad4cd0a676760de3111ae46cf97acefefbde..757abee4c2cc2a4696897435ca3eb8edb580b04f 100644 (file)
@@ -591,7 +591,6 @@ static int rtl2832u_fc0012_tuner_callback(struct dvb_usb_device *d,
                goto err;
        }
        return 0;
-
 err:
        dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, ret);
        return ret;
@@ -643,7 +642,6 @@ static int rtl2832u_tua9001_tuner_callback(struct dvb_usb_device *d,
        }
 
        return 0;
-
 err:
        dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, ret);
        return ret;
@@ -656,17 +654,15 @@ static int rtl2832u_tuner_callback(struct dvb_usb_device *d, int cmd, int arg)
        switch (priv->tuner) {
        case TUNER_RTL2832_FC0012:
                return rtl2832u_fc0012_tuner_callback(d, cmd, arg);
-
        case TUNER_RTL2832_FC0013:
                return rtl2832u_fc0013_tuner_callback(d, cmd, arg);
-
        case TUNER_RTL2832_TUA9001:
                return rtl2832u_tua9001_tuner_callback(d, cmd, arg);
        default:
                break;
        }
 
-       return -ENODEV;
+       return 0;
 }
 
 static int rtl2832u_frontend_callback(void *adapter_priv, int component,
@@ -682,7 +678,7 @@ static int rtl2832u_frontend_callback(void *adapter_priv, int component,
                break;
        }
 
-       return -EINVAL;
+       return 0;
 }
 
 static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)