Skip to content

Commit ac82845

Browse files
Dan Carpentermchehab
authored andcommitted
media: atomisp: Fix error code in ov5693_probe()
If gmin_camera_platform_data() returns NULL then we should return a negative error instead of success. Fixes: 90ebe55 ("media: staging: atomisp: Add driver prefix to Kconfig option and module names") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 3d81099 commit ac82845

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ static int ov5693_probe(struct i2c_client *client)
18991899
{
19001900
struct ov5693_device *dev;
19011901
int i2c;
1902-
int ret = 0;
1902+
int ret;
19031903
void *pdata;
19041904
unsigned int i;
19051905

@@ -1929,8 +1929,10 @@ static int ov5693_probe(struct i2c_client *client)
19291929
pdata = gmin_camera_platform_data(&dev->sd,
19301930
ATOMISP_INPUT_FORMAT_RAW_10,
19311931
atomisp_bayer_order_bggr);
1932-
if (!pdata)
1932+
if (!pdata) {
1933+
ret = -EINVAL;
19331934
goto out_free;
1935+
}
19341936

19351937
ret = ov5693_s_config(&dev->sd, client->irq, pdata);
19361938
if (ret)

0 commit comments

Comments
 (0)