diff options
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/gspca/m5602/m5602_ov7660.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/m5602/m5602_ov7660.c b/drivers/media/usb/gspca/m5602/m5602_ov7660.c index 4ac78893cc5f..64b3b03a9141 100644 --- a/drivers/media/usb/gspca/m5602/m5602_ov7660.c +++ b/drivers/media/usb/gspca/m5602/m5602_ov7660.c @@ -96,7 +96,7 @@ sensor_found: int ov7660_init(struct sd *sd) { - int i, err = 0; + int i, err; /* Init the sensor */ for (i = 0; i < ARRAY_SIZE(init_ov7660); i++) { @@ -111,6 +111,8 @@ int ov7660_init(struct sd *sd) err = m5602_write_sensor(sd, init_ov7660[i][1], data, 1); } + if (err < 0) + return err; } if (dump_sensor) |