linux/drivers/media/usb/gspca/m5602
Mauro Carvalho Chehab 9dc033f1ea [media] m5602_ov7660: return error at ov7660_init()
It used to be a code that returns arror at ov7660_init.
However, this was removed by changeset c84e412f:

@@ -231,33 +116,40 @@ int ov7660_init(struct sd *sd)
        if (dump_sensor)
                ov7660_dump_registers(sd);

-   err = ov7660_set_gain(&sd->gspca_dev, sensor_settings[GAIN_IDX]);
-   if (err < 0)
-           return err;
+ return 0;
+}

-   err = ov7660_set_auto_white_balance(&sd->gspca_dev,
-           sensor_settings[AUTO_WHITE_BALANCE_IDX]);
-   if (err < 0)
-           return err;

As complained by gcc:
	drivers/media/usb/gspca/m5602/m5602_ov7660.c: In function 'ov7660_init':
	drivers/media/usb/gspca/m5602/m5602_ov7660.c:99:9: warning: variable 'err' set but not used [-Wunused-but-set-variable]

It should be noticed that the original error code was crappy, as it wasn't
returning any error if sensor init fails.

Fix it by returning an error if the sensor can't be initialized.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 09:46:48 -03:00
..
Kconfig
m5602_bridge.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_core.c [media] gspca: Remove gspca-specific debug magic 2013-03-05 15:13:48 -03:00
m5602_mt9m111.c [media] gspca: Remove gspca-specific debug magic 2013-03-05 15:13:48 -03:00
m5602_mt9m111.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_ov7660.c [media] m5602_ov7660: return error at ov7660_init() 2013-03-22 09:46:48 -03:00
m5602_ov7660.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_ov9650.c [media] gspca: Remove gspca-specific debug magic 2013-03-05 15:13:48 -03:00
m5602_ov9650.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_po1030.c [media] gspca: Remove gspca-specific debug magic 2013-03-05 15:13:48 -03:00
m5602_po1030.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_s5k4aa.c [media] gspca: Remove gspca-specific debug magic 2013-03-05 15:13:48 -03:00
m5602_s5k4aa.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_s5k83a.c [media] gspca: Remove gspca-specific debug magic 2013-03-05 15:13:48 -03:00
m5602_s5k83a.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
m5602_sensor.h [media] gscpa_m5602: Convert to the control framework 2013-03-05 15:10:27 -03:00
Makefile