All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: wifi: rtlwifi: fix error codes in rtl_debugfs_set_write_h2c()
Date: Mon, 30 May 2022 11:17:39 +0000 (UTC)	[thread overview]
Message-ID: <165390945770.29197.8369000797188953316.kvalo@kernel.org> (raw)
In-Reply-To: <YoOLnDkHgVltyXK7@kili>

Dan Carpenter <dan.carpenter@oracle.com> 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@oracle.com>

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


      reply	other threads:[~2022-05-30 11:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 11:48 [PATCH] rtlwifi: fix error codes in rtl_debugfs_set_write_h2c() Dan Carpenter
2022-05-30 11:17 ` Kalle Valo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165390945770.29197.8369000797188953316.kvalo@kernel.org \
    --to=kvalo@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.