From: Larry Finger <Larry.Finger@lwfinger.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: r8712u: cleanup pointer type in r8712_setassocsta_cmd()
Date: Thu, 25 Oct 2012 14:58:17 +0000 [thread overview]
Message-ID: <50895389.3040809@lwfinger.net> (raw)
In-Reply-To: <20121025123006.GB20595@elgon.mountain>
On 10/25/2012 07:30 AM, Dan Carpenter wrote:
> This seems like a cut and paste bug. Smatch complains that we don't
> allocate enough memory for a set_stakey_rsp struct. In fact this is
> used as a set_assocsta_rsp struct throughout and that also matches the
> name of the function.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
>
> diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
> index 659683e..31f31dbf 100644
> --- a/drivers/staging/rtl8712/rtl871x_cmd.c
> +++ b/drivers/staging/rtl8712/rtl871x_cmd.c
> @@ -814,7 +814,7 @@ u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr)
> struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
> struct cmd_obj *ph2c;
> struct set_assocsta_parm *psetassocsta_para;
> - struct set_stakey_rsp *psetassocsta_rsp = NULL;
> + struct set_assocsta_rsp *psetassocsta_rsp = NULL;
>
> ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj));
> if (ph2c = NULL)
> @@ -825,7 +825,7 @@ u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr)
> kfree((u8 *) ph2c);
> return _FAIL;
> }
> - psetassocsta_rsp = (struct set_stakey_rsp *)_malloc(
> + psetassocsta_rsp = (struct set_assocsta_rsp *)_malloc(
> sizeof(struct set_assocsta_rsp));
> if (psetassocsta_rsp = NULL) {
> kfree((u8 *)ph2c);
>
prev parent reply other threads:[~2012-10-25 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 12:30 [patch] staging: r8712u: cleanup pointer type in r8712_setassocsta_cmd() Dan Carpenter
2012-10-25 14:58 ` 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=50895389.3040809@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=kernel-janitors@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 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.