From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Martin Kaiser <martin@kaiser.cx>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: handle errors from ReadAdapterInfo8188EU
Date: Sun, 24 Jul 2022 18:18:00 +0200 [thread overview]
Message-ID: <Yt1wuJKzzUTpxMY3@kroah.com> (raw)
In-Reply-To: <20220724161405.146488-1-martin@kaiser.cx>
On Sun, Jul 24, 2022 at 06:14:05PM +0200, Martin Kaiser wrote:
> Update ReadAdapterInfo8188EU to return 0 for success or a negative
> error code. Don't use the infamous _SUCCESS and _FAIL defines.
>
> Handle returned errors in rtw_usb_if1_init, this will eventually fail the
> probing of the r8188eu driver.
>
> Suggested-by: Pavel Skripkin <paskripkin@gmail.com>
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
> drivers/staging/r8188eu/hal/usb_halinit.c | 7 ++++---
> drivers/staging/r8188eu/include/hal_intf.h | 2 +-
> drivers/staging/r8188eu/os_dep/usb_intf.c | 3 ++-
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index 421fe7c40390..08d4b5dfd430 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -922,7 +922,7 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool
> }
> }
>
> -void ReadAdapterInfo8188EU(struct adapter *Adapter)
> +int ReadAdapterInfo8188EU(struct adapter *Adapter)
> {
> struct eeprom_priv *eeprom = &Adapter->eeprompriv;
> struct led_priv *ledpriv = &Adapter->ledpriv;
> @@ -933,13 +933,13 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
> /* check system boot selection */
> res = rtw_read8(Adapter, REG_9346CR, &eeValue);
> if (res)
> - return;
> + return -1;
This is not a valid error code, please use a real -ESOMETHING instead.
thanks,
greg k-h
next prev parent reply other threads:[~2022-07-24 16:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-24 16:14 [PATCH] staging: r8188eu: handle errors from ReadAdapterInfo8188EU Martin Kaiser
2022-07-24 16:18 ` Greg Kroah-Hartman [this message]
2022-07-24 16:18 ` Greg Kroah-Hartman
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=Yt1wuJKzzUTpxMY3@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.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.