From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 4/6] [ALSA] portman2x4 - NULL check
Date: Thu, 7 Jan 2016 12:45:49 +0530 [thread overview]
Message-ID: <1452150951-1571-4-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1452150951-1571-1-git-send-email-sudipm.mukherjee@gmail.com>
Instead of checking var == NULL, the kernel coding style recommends
writing it as !var.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
sound/drivers/portman2x4.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index 65b0650..985cf67 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -105,7 +105,7 @@ static int portman_create(struct snd_card *card,
*rchip = NULL;
pm = kzalloc(sizeof(struct portman), GFP_KERNEL);
- if (pm == NULL)
+ if (!pm)
return -ENOMEM;
/* Init chip specific data */
@@ -764,7 +764,7 @@ static int snd_portman_probe(struct platform_device *pdev)
snd_portman_interrupt, /* ISR */
PARPORT_DEV_EXCL, /* flags */
(void *)card); /* private */
- if (pardev == NULL) {
+ if (!pardev) {
snd_printd("Cannot register pardevice\n");
err = -EIO;
goto __err;
--
1.9.1
next prev parent reply other threads:[~2016-01-07 7:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 7:15 [PATCH 1/6] [ALSA] portman2x4 - fix trailing whitespace Sudip Mukherjee
2016-01-07 7:15 ` [PATCH 2/6] [ALSA] portman2x4 - fix blanklines Sudip Mukherjee
2016-01-07 7:15 ` [PATCH 3/6] [ALSA] portman2x4 - remove space Sudip Mukherjee
2016-01-07 7:15 ` Sudip Mukherjee [this message]
2016-01-07 7:15 ` [PATCH 5/6] [ALSA] portman2x4 - assignment in if Sudip Mukherjee
2016-01-07 7:15 ` [PATCH 6/6] [ALSA] portman2x4 - use new parport device model Sudip Mukherjee
2016-01-07 10:26 ` Takashi Iwai
2016-01-07 10:44 ` [alsa-devel] " Sudip Mukherjee
2016-01-07 10:50 ` Takashi Iwai
2016-01-07 11:01 ` Sudip Mukherjee
2016-01-07 11:19 ` Sudip Mukherjee
2016-01-07 11:45 ` Takashi Iwai
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=1452150951-1571-4-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).