Search Linux Wireless

Re: [PATCH 35/35] staging: brcm80211: replace simple_strtoul usage in brcmfmac

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

 



On Thu, Jul 14, 2011 at 02:29:31PM -0700, Franky Lin wrote:
> --- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c
> +++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
> @@ -827,10 +827,13 @@ static int brcmf_c_pattern_atoh(char *src, char *dst)
>  		return -EINVAL;
>  	}
>  	for (i = 0; *src != '\0'; i++) {
> +		unsigned long res;
>  		char num[3];
>  		strncpy(num, src, 2);
>  		num[2] = '\0';
> -		dst[i] = (u8) simple_strtoul(num, NULL, 16);
> +		if (kstrtoul(num, 16, &res))
> +			return -1;
			       ^^
Not a proper error code.

> +		dst[i] = (u8)res;
>  		src += 2;

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux