public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] hwmon: (f71882fg) Signedness bug in f71882fg_init()
@ 2012-08-10  9:24 Dan Carpenter
  2012-08-10 18:45 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-08-10  9:24 UTC (permalink / raw)
  To: kernel-janitors

"address" stores and unsigned short on success but a negative on failure
so it needs to be an int.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Applies to linux-next.  This was introduced in 1f7f944 "hwmon:
(f71882fg) Fix build warning".

diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index b6304eb..853f544 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -2662,7 +2662,7 @@ exit_device_put:
 static int __init f71882fg_init(void)
 {
 	int err = -ENODEV;
-	unsigned short address;
+	int address;
 	struct f71882fg_sio_data sio_data;
 
 	memset(&sio_data, 0, sizeof(sio_data));

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] hwmon: (f71882fg) Signedness bug in f71882fg_init()
  2012-08-10  9:24 [patch] hwmon: (f71882fg) Signedness bug in f71882fg_init() Dan Carpenter
@ 2012-08-10 18:45 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2012-08-10 18:45 UTC (permalink / raw)
  To: kernel-janitors

On Fri, Aug 10, 2012 at 12:24:37PM +0300, Dan Carpenter wrote:
> "address" stores and unsigned short on success but a negative on failure
> so it needs to be an int.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Patch merged into the original patch introducing the problem.

Thanks,
Guenter

> ---
> Applies to linux-next.  This was introduced in 1f7f944 "hwmon:
> (f71882fg) Fix build warning".
> 
> diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
> index b6304eb..853f544 100644
> --- a/drivers/hwmon/f71882fg.c
> +++ b/drivers/hwmon/f71882fg.c
> @@ -2662,7 +2662,7 @@ exit_device_put:
>  static int __init f71882fg_init(void)
>  {
>  	int err = -ENODEV;
> -	unsigned short address;
> +	int address;
>  	struct f71882fg_sio_data sio_data;
>  
>  	memset(&sio_data, 0, sizeof(sio_data));
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-10 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10  9:24 [patch] hwmon: (f71882fg) Signedness bug in f71882fg_init() Dan Carpenter
2012-08-10 18:45 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox