All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Cc: Outreachy <outreachy-kernel@googlegroups.com>
Subject: Re: [PATCH] staging: rtl8712: Comparison to NULL.
Date: Mon, 11 Mar 2019 15:54:35 -0700	[thread overview]
Message-ID: <20190311225435.GC569@kroah.com> (raw)
In-Reply-To: <20190309175145.GA17784@bhagyashri-Lenovo-G570>

On Sat, Mar 09, 2019 at 11:21:46PM +0530, Bhagyashri Dighole wrote:
> --- a/drivers/staging/rtl8712/rtl871x_security.c
> +++ b/drivers/staging/rtl8712/rtl871x_security.c
> @@ -160,7 +160,7 @@ void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe)
>  	struct	security_priv *psecuritypriv = &padapter->securitypriv;
>  	struct	xmit_priv *pxmitpriv = &padapter->xmitpriv;
>  
> -	if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
> +	if (((struct xmit_frame *)pxmitframe)->!buf_addr)
>  		return;
>  	pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + TXDESC_OFFSET;
>  	/*start to encrypt each fragment*/

Does this change even build?

That's crazy, and shouldn't be valid C :(

You do this in a few places.  Shouldn't this be an coccinelle patch, so
you don't have to do it by hand and we trust the changes were done
properly?

thanks,

greg k-h


      reply	other threads:[~2019-03-11 22:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-09 17:51 [PATCH] staging: rtl8712: Comparison to NULL Bhagyashri Dighole
2019-03-11 22:54 ` Greg Kroah-Hartman [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=20190311225435.GC569@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=digholebhagyashri@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /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.