From: Larry Finger <Larry.Finger@lwfinger.net>
To: Christopher Diaz Riveros <chrisadr@gentoo.org>,
gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH-next] staging: rtl8188eu: Remove unneeded cast
Date: Tue, 20 Feb 2018 12:15:42 -0600 [thread overview]
Message-ID: <a418ef3d-c297-8438-6246-321bd05a930f@lwfinger.net> (raw)
In-Reply-To: <20180220163722.14694-1-chrisadr@gentoo.org>
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@gentoo.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.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;
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
prev parent reply other threads:[~2018-02-20 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 16:37 Christopher Diaz Riveros
2018-02-20 18:15 ` Larry Finger [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=a418ef3d-c297-8438-6246-321bd05a930f@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=chrisadr@gentoo.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®