Search Linux Wireless

Re: wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c()

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

 



Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> If the copy_from_user() fails or the user gives invalid date then the
> correct thing to do is to return a negative error code.  (Currently it
> returns success).
> 
> I made a copy additional related cleanups:
> 1) There is no need to check "buffer" for NULL.  That's handled by
> copy_from_user().
> 2) The "h2c_len" variable cannot be negative because it is unsigned
> and because sscanf() does not return negative error codes.
> 
> Fixes: 610247f46feb ("rtlwifi: Improve debugging by using debugfs")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Patch applied to wireless-next.git, thanks.

b88d28146c30 wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/YoOLnDkHgVltyXK7@kili/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux