Re: [patch] sony-laptop: fix a couple signedness bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 07.06.2012 10:22, schrieb Dan Carpenter:
> These need to be signed to handle negative error codes.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> index 210d4ae..0a2f026 100644
> --- a/drivers/platform/x86/sony-laptop.c
> +++ b/drivers/platform/x86/sony-laptop.c
> @@ -2113,7 +2113,7 @@ static ssize_t sony_nc_thermal_mode_show(struct device *dev,
>  		struct device_attribute *attr, char *buffer)
>  {
>  	ssize_t count = 0;
> -	unsigned int mode = sony_nc_thermal_mode_get();
> +	int mode = sony_nc_thermal_mode_get();
>  
>  	if (mode < 0)
>  		return mode;
> @@ -2480,7 +2480,7 @@ static void sony_nc_backlight_ng_read_limits(int handle,
>  	props->maxlvl = 0xff;
>  
>  	offset = sony_find_snc_handle(handle);

sony_find_snc_handle() should return an int, did something change ?

> -	if (offset < 0)
> +	if ((int)offset < 0)
>  		return;
>  
>  	/* try to read the boundaries from ACPI tables, if we fail the above




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


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux