From: Greg KH <gregkh@linuxfoundation.org>
To: simran singhal <singhalsimran0@gmail.com>
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
florian.c.schilhabel@googlemail.com,
outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: media: Clean up tests if NULL returned on failure
Date: Thu, 9 Mar 2017 17:46:19 +0100 [thread overview]
Message-ID: <20170309164619.GB12365@kroah.com> (raw)
In-Reply-To: <1488567319-25989-2-git-send-email-singhalsimran0@gmail.com>
On Sat, Mar 04, 2017 at 12:25:18AM +0530, simran singhal wrote:
> Some functions like kmalloc/kzalloc return NULL on failure.
> When NULL represents failure, !x is commonly used.
>
> This was done using Coccinelle:
> @@
> expression *e;
> identifier l1;
> @@
>
> e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
> ...
> - e == NULL
> + !e
>
> Signed-off-by: simran singhal <singhalsimran0@gmail.com>
> ---
> drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 2 +-
> drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 4 ++--
> drivers/staging/media/lirc/lirc_zilog.c | 6 +++---
> 3 files changed, 6 insertions(+), 6 deletions(-)
Please break this up into one patch per driver.
thanks,
greg k-h
next prev parent reply other threads:[~2017-03-09 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 18:55 [PATCH 0/2] " simran singhal
2017-03-03 18:55 ` [PATCH 1/2] staging: media: " simran singhal
2017-03-09 16:46 ` Greg KH [this message]
2017-03-03 18:55 ` [PATCH 2/2] staging: rtl8192e: " simran singhal
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=20170309164619.GB12365@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=singhalsimran0@gmail.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 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®