Skip to content

Commit

Permalink
V4L/DVB: drivers/media/video: Use available error codes
Browse files Browse the repository at this point in the history
Error codes are stored in rc, but the return value is always 0.  Return rc
instead.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression x;
constant C;
@@

if (...) { ...
  x = -C
  ... when != x
(
  return <+...x...+>;
|
  return NULL;
|
  return;
|
* return ...;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Julia Lawall authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent f277097 commit 3053814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/zr364xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ static int zr364xx_got_frame(struct zr364xx_camera *cam, int jpgsize)
DBG("wakeup [buf/i] [%p/%d]\n", buf, buf->vb.i);
unlock:
spin_unlock_irqrestore(&cam->slock, flags);
return 0;
return rc;
}

/* this function moves the usb stream read pipe data
Expand Down

0 comments on commit 3053814

Please sign in to comment.