[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yt1wuJKzzUTpxMY3@kroah.com>
Date: Sun, 24 Jul 2022 18:18:00 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Martin Kaiser <martin@...ser.cx>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Michael Straube <straube.linux@...il.com>,
Pavel Skripkin <paskripkin@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8188eu: handle errors from
ReadAdapterInfo8188EU
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@...il.com>
> Signed-off-by: Martin Kaiser <martin@...ser.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
Powered by blists - more mailing lists