Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303334
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] [ALSA] portman2x4 - NULL check |
| Date | 2016-01-07 08:20 +0100 |
| Message-ID | <qOd1w-4IS-21@gated-at.bofh.it> (permalink) |
| References | <qOd1v-4IS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/6] [ALSA] portman2x4 - fix trailing whitespace Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-01-07 08:20 +0100 [PATCH 4/6] [ALSA] portman2x4 - NULL check Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-01-07 08:20 +0100
csiph-web