Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] v4l: mt9v032: Consider control initialization errors as fatal

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

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Laurent Pinchart and committed by
Mauro Carvalho Chehab
2d01209f 7c3be9f8

+6 -3
+6 -3
drivers/media/i2c/mt9v032.c
··· 961 961 962 962 mt9v032->subdev.ctrl_handler = &mt9v032->ctrls; 963 963 964 - if (mt9v032->ctrls.error) 965 - printk(KERN_INFO "%s: control initialization error %d\n", 966 - __func__, mt9v032->ctrls.error); 964 + if (mt9v032->ctrls.error) { 965 + dev_err(&client->dev, "control initialization error %d\n", 966 + mt9v032->ctrls.error); 967 + ret = mt9v032->ctrls.error; 968 + goto err; 969 + } 967 970 968 971 mt9v032->crop.left = MT9V032_COLUMN_START_DEF; 969 972 mt9v032->crop.top = MT9V032_ROW_START_DEF;