The device requires control to be properly operated, they're not
optional.

Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
---
 drivers/media/i2c/mt9v032.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c
index a6ea091..1ca82d4 100644
--- a/drivers/media/i2c/mt9v032.c
+++ b/drivers/media/i2c/mt9v032.c
@@ -1013,9 +1013,12 @@ static int mt9v032_probe(struct i2c_client *client,
 
        mt9v032->subdev.ctrl_handler = &mt9v032->ctrls;
 
-       if (mt9v032->ctrls.error)
-               printk(KERN_INFO "%s: control initialization error %d\n",
-                      __func__, mt9v032->ctrls.error);
+       if (mt9v032->ctrls.error) {
+               dev_err(&client->dev, "control initialization error %d\n",
+                       mt9v032->ctrls.error);
+               ret = mt9v032->ctrls.error;
+               goto err;
+       }
 
        mt9v032->crop.left = MT9V032_COLUMN_START_DEF;
        mt9v032->crop.top = MT9V032_ROW_START_DEF;
-- 
Regards,

Laurent Pinchart

--
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