[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a418ef3d-c297-8438-6246-321bd05a930f@lwfinger.net>
Date: Tue, 20 Feb 2018 12:15:42 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: Christopher Diaz Riveros <chrisadr@...too.org>,
gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
devel@...verdev.osuosl.org
Subject: Re: [PATCH-next] staging: rtl8188eu: Remove unneeded cast
On 02/20/2018 10:37 AM, Christopher Diaz Riveros wrote:
> Fix Coccinelle alert:
>
> drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Christopher Diaz Riveros <chrisadr@...too.org>
Acked-by: Larry Finger <Larry.Finger@...inger.net>
> ---
> drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> index 32c7225a831e..127ecf896fc9 100644
> --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> @@ -333,7 +333,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
> struct net_device *pmondev;
> int status = _FAIL;
>
> - padapter = (struct adapter *)vzalloc(sizeof(*padapter));
> + padapter = vzalloc(sizeof(*padapter));
> if (padapter == NULL)
> goto exit;
> padapter->dvobj = dvobj;
>
Powered by blists - more mailing lists