diff mbox

[media] qt1010: signedness bug in qt1010_init_meas1()

Message ID 20120810092502.GD26875@elgon.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Aug. 10, 2012, 9:25 a.m. UTC
qt1010_init_meas2() returns zero on success and negative error codes on
failure so the return type should be int instead of u8.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Antti Palosaari Aug. 10, 2012, 10:26 a.m. UTC | #1
On 08/10/2012 12:25 PM, Dan Carpenter wrote:
> qt1010_init_meas2() returns zero on success and negative error codes on
> failure so the return type should be int instead of u8.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Antti Palosaari <crope@iki.fi>


>
> diff --git a/drivers/media/common/tuners/qt1010.c b/drivers/media/common/tuners/qt1010.c
> index 2d79b1f..bdc39e1 100644
> --- a/drivers/media/common/tuners/qt1010.c
> +++ b/drivers/media/common/tuners/qt1010.c
> @@ -288,7 +288,7 @@ static int qt1010_init_meas1(struct qt1010_priv *priv,
>   	return qt1010_writereg(priv, 0x1e, 0x00);
>   }
>
> -static u8 qt1010_init_meas2(struct qt1010_priv *priv,
> +static int qt1010_init_meas2(struct qt1010_priv *priv,
>   			    u8 reg_init_val, u8 *retval)
>   {
>   	u8 i, val;
>
diff mbox

Patch

diff --git a/drivers/media/common/tuners/qt1010.c b/drivers/media/common/tuners/qt1010.c
index 2d79b1f..bdc39e1 100644
--- a/drivers/media/common/tuners/qt1010.c
+++ b/drivers/media/common/tuners/qt1010.c
@@ -288,7 +288,7 @@  static int qt1010_init_meas1(struct qt1010_priv *priv,
 	return qt1010_writereg(priv, 0x1e, 0x00);
 }
 
-static u8 qt1010_init_meas2(struct qt1010_priv *priv,
+static int qt1010_init_meas2(struct qt1010_priv *priv,
 			    u8 reg_init_val, u8 *retval)
 {
 	u8 i, val;