lkml.org 
[lkml]   [2012]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()
From
On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl <jj@chaosbits.net> wrote:
> There are two checks for 'rc' being less than zero with no change to
> 'rc' between the two, so the second is just dead code - remove it.
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> ---
> drivers/media/usb/stk1160/stk1160-i2c.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c b/drivers/media/usb/stk1160/stk1160-i2c.c
> index 176ac93..035cf8c 100644
> --- a/drivers/media/usb/stk1160/stk1160-i2c.c
> +++ b/drivers/media/usb/stk1160/stk1160-i2c.c
> @@ -117,9 +117,6 @@ static int stk1160_i2c_read_reg(struct stk1160 *dev, u8 addr,
> return rc;
>
> stk1160_read_reg(dev, STK1160_SBUSR_RD, value);
> - if (rc < 0)
> - return rc;
> -
> return 0;
> }
>

Thanks for doing this. Wouldn't you like to save stk1160_read_reg
return code to rc, instead of this?

Ezequiel


\
 
 \ /
  Last update: 2012-10-13 06:21    [W:0.107 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site