From: Greg KH <gregkh@linuxfoundation.org>
To: Xu Jia <xujia39@huawei.com>
Cc: ross.schm.dev@gmail.com, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev, hulkcommits@huawei.com
Subject: Re: [PATCH -next] staging: rtl8723bs: core: fix error return
Date: Fri, 26 Mar 2021 15:08:05 +0100 [thread overview]
Message-ID: <YF3qxema68+hLEZq@kroah.com> (raw)
In-Reply-To: <20210325083041.1881347-1-xujia39@huawei.com>
On Thu, Mar 25, 2021 at 04:30:41PM +0800, Xu Jia wrote:
> Function rtw_init_bcmc_stainfo() is always return success.
> Variable 'ret' set but not used.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Xu Jia <xujia39@huawei.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
> index f96dd0b40e04..7b578192adf5 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
> @@ -551,7 +551,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
> psta->mac_id = 1;
>
> exit:
> - return _SUCCESS;
> + return res;
> }
You just changed the logic of this function, now it can return a
failure. Is that ok? have you tested it when this fails?
Given that I do not think anyone actually tests this value, should this
function just return void instead?
thanks,
greg k-h
prev parent reply other threads:[~2021-03-26 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 8:30 [PATCH -next] staging: rtl8723bs: core: fix error return Xu Jia
2021-03-26 14:08 ` Greg KH [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=YF3qxema68+hLEZq@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=hulkcommits@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=ross.schm.dev@gmail.com \
--cc=xujia39@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox