linux/drivers/media/usb
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
..
au0828 [media] au0828: Replace memcpy with struct assignment 2012-12-27 18:49:44 -02:00
b2c2
cpia2 [media] v4l: Tell user space we're using monotonic timestamps 2012-12-21 11:20:51 -02:00
cx231xx [media] cx231xx : Add support for OTG102 aka EZGrabber2 2013-03-18 17:22:55 -03:00
dvb-usb [media] [1/1,dvb-usb] GOTVIEW SatelliteHD card support 2013-03-19 16:00:40 -03:00
dvb-usb-v2 [media] af9035: style changes for remote controller polling 2013-03-21 19:06:31 -03:00
em28xx [media] em28xx: Add ISDB support for c3tech Digital duo 2013-03-19 15:13:50 -03:00
gspca [media] m5602_ov7660: return error at ov7660_init() 2013-03-22 09:46:48 -03:00
hdpvr [media] hdpvr: Fix memory leak 2013-03-18 16:39:08 -03:00
pvrusb2 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2013-02-24 17:35:10 -08:00
pwc [media] vb2: Add support for non monotonic timestamps 2013-03-05 14:53:05 -03:00
s2255 [media] s2255: fix big-endian support 2013-03-05 15:42:30 -03:00
siano [media] siano: remove the remaining CamelCase compliants 2013-03-21 10:03:45 -03:00
sn9c102 [media] sn9c102: Replace memcpy with struct assignment 2012-12-27 18:44:46 -02:00
stk1160 [media] vb2: Add support for non monotonic timestamps 2013-03-05 14:53:05 -03:00
stkwebcam [media] stk-webcam: implement support for count == 0 when calling REQBUFS 2013-03-05 14:44:17 -03:00
tlg2300 [media] tlg2300: Remove logs() macro 2013-03-05 11:49:01 -03:00
tm6000 [media] tm6000: fix an uninitialized variable 2013-02-08 17:30:53 -02:00
ttusb-budget [media] dvb-usb: check for invalid length in ttusb_process_muxpack() 2013-02-08 17:29:52 -02:00
ttusb-dec
usbvision Merge branch 'v4l_for_linus' into staging/for_v3.9 2013-01-24 18:49:18 -02:00
uvc [media] vb2: Add support for non monotonic timestamps 2013-03-05 14:53:05 -03:00
zr364xx [media] v4l: Convert drivers to use monotonic timestamps 2012-12-21 10:56:43 -02:00
Kconfig [media] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2 2012-12-17 14:31:26 -02:00
Makefile