diff mbox

si2165: change return type of si2165_wait_init_done from bool to int

Message ID 1407180463-17936-1-git-send-email-zzam@gentoo.org (mailing list archive)
State New, archived
Headers show

Commit Message

Matthias Schwarzott Aug. 4, 2014, 7:27 p.m. UTC
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@gentoo.org>
---
 drivers/media/dvb-frontends/si2165.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox

Patch

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,