From: Michael Straube <straube.linux@gmail.com>
To: Pavel Skripkin <paskripkin@gmail.com>,
Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
gregkh@linuxfoundation.org, fmdefrancesco@gmail.com
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: fix type mismacth
Date: Sun, 5 Sep 2021 23:40:37 +0200 [thread overview]
Message-ID: <94b3634f-f531-d4f1-2809-dc4de5b9b876@gmail.com> (raw)
In-Reply-To: <20210905205216.24831-1-paskripkin@gmail.com>
Hi Pavel,
On 9/5/21 22:52, Pavel Skripkin wrote:
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
> index fee4208dacba..afe6c7fa594d 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -1162,7 +1162,7 @@ u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr)
> goto exit;
> }
>
> - psetassocsta_rsp = kzalloc(sizeof(struct set_assocsta_rsp), GFP_ATOMIC);
> + psetassocsta_rsp = kzalloc(sizeof(struct set_stakey_rsp), GFP_ATOMIC);
this should be
psetassocsta_rsp = kzalloc(sizeof(*psetassocsta_rsp), GFP_ATOMIC);
This way you get always the correct size, no matter what's the type of
psetassocsta_rsp. Checkpatch suggests this too. ;)
Best regards,
Michael
next prev parent reply other threads:[~2021-09-05 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-05 20:52 [PATCH] staging: r8188eu: fix type mismacth Pavel Skripkin
2021-09-05 21:40 ` Michael Straube [this message]
2021-09-06 6:56 ` Dan Carpenter
2021-09-06 15:59 ` Pavel Skripkin
2021-09-06 9:44 ` Greg KH
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=94b3634f-f531-d4f1-2809-dc4de5b9b876@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=fmdefrancesco@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
/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;
as well as URLs for NNTP newsgroup(s).