summaryrefslogtreecommitdiff
path: root/drivers/media/usb/gspca/cpia1.c
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2012-09-06 12:24:01 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-13 17:42:16 -0300
commit8c96f0a207bedb6f06089fde9adc7abe8136a087 (patch)
tree0b1c629b9f196b27ac295d9f500c8cfe536950ef /drivers/media/usb/gspca/cpia1.c
parent50c457a950ac06b4c461ed36fdb4a84c0d27a82b (diff)
[media] drivers/media/usb/gspca/cpia1.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/gspca/cpia1.c')
-rw-r--r--drivers/media/usb/gspca/cpia1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c
index 2499a881d9a3..b3ba47d4d6a2 100644
--- a/drivers/media/usb/gspca/cpia1.c
+++ b/drivers/media/usb/gspca/cpia1.c
@@ -751,7 +751,7 @@ static int goto_high_power(struct gspca_dev *gspca_dev)
if (signal_pending(current))
return -EINTR;
- do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0);
+ ret = do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0);
if (ret)
return ret;