It is not good idea to return error for missing callback
handler as whole callback as optional and could be missing
by intentionally.

Signed-off-by: Antti Palosaari <cr...@iki.fi>
---
 drivers/media/usb/dvb-usb-v2/af9035.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c 
b/drivers/media/usb/dvb-usb-v2/af9035.c
index b700444..fdec3b1 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -652,7 +652,7 @@ static int af9035_tuner_callback(struct dvb_usb_device *d, 
int cmd, int arg)
                break;
        }
 
-       return -ENODEV;
+       return 0;
 }
 
 static int af9035_frontend_callback(void *adapter_priv, int component,
@@ -661,6 +661,9 @@ static int af9035_frontend_callback(void *adapter_priv, int 
component,
        struct i2c_adapter *adap = adapter_priv;
        struct dvb_usb_device *d = i2c_get_adapdata(adap);
 
+       dev_dbg(&d->udev->dev, "%s: component=%d cmd=%d arg=%d\n",
+                       __func__, component, cmd, arg);
+
        switch (component) {
        case DVB_FRONTEND_COMPONENT_TUNER:
                return af9035_tuner_callback(d, cmd, arg);
@@ -668,7 +671,7 @@ static int af9035_frontend_callback(void *adapter_priv, int 
component,
                break;
        }
 
-       return -EINVAL;
+       return 0;
 }
 
 static int af9035_frontend_attach(struct dvb_usb_adapter *adap)
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to