In case of an error -EINVAL will be mis-casted to 1. This was triggered by a coccinelle warning. Signed-off-by: Matthias Schwarzott <zzam@xxxxxxxxxx> --- drivers/media/dvb-frontends/si2165.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c index 3a2d6c5..f02d946 100644 --- a/drivers/media/dvb-frontends/si2165.c +++ b/drivers/media/dvb-frontends/si2165.c @@ -312,9 +312,8 @@ static u32 si2165_get_fe_clk(struct si2165_state *state) return state->adc_clk; } -static bool si2165_wait_init_done(struct si2165_state *state) +static int si2165_wait_init_done(struct si2165_state *state) { - int ret = -EINVAL; u8 val = 0; int i; @@ -326,7 +325,7 @@ static bool si2165_wait_init_done(struct si2165_state *state) } dev_err(&state->i2c->dev, "%s: init_done was not set\n", KBUILD_MODNAME); - return ret; + return -EINVAL; } static int si2165_upload_firmware_block(struct si2165_state *state, -- 2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html