Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1294798

[PATCH 1/5] staging: media: lirc: replace NULL comparisons with !var

From Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/5] staging: media: lirc: replace NULL comparisons with !var
Date 2015-12-18 14:10 +0100
Message-ID <qH2Xf-64F-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


A NULL comparison can be written as if (var) or if (!var).
Reported by checkpatch.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/media/lirc/lirc_parallel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c b/drivers/staging/media/lirc/lirc_parallel.c
index c140834..9df8d14 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -652,7 +652,7 @@ static int __init lirc_parallel_init(void)
 		goto exit_device_put;
 
 	pport = parport_find_base(io);
-	if (pport == NULL) {
+	if (!pport) {
 		pr_notice("no port at %x found\n", io);
 		result = -ENXIO;
 		goto exit_device_put;
@@ -661,7 +661,7 @@ static int __init lirc_parallel_init(void)
 					   pf, kf, lirc_lirc_irq_handler, 0,
 					   NULL);
 	parport_put_port(pport);
-	if (ppdevice == NULL) {
+	if (!ppdevice) {
 		pr_notice("parport_register_device() failed\n");
 		result = -ENXIO;
 		goto exit_device_put;
-- 
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 | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/5] staging: media: lirc: replace NULL comparisons with !var Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-18 14:10 +0100
  [PATCH 3/5] staging: media: lirc: space around operator Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-18 14:10 +0100
  [PATCH 2/5] staging: media: lirc: no space after cast Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-18 14:10 +0100
  [PATCH 5/5] staging: media: lirc: use new parport device model Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-18 14:10 +0100
  Re: [PATCH 1/5] staging: media: lirc: replace NULL comparisons with  !var Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-12-30 05:30 +0100

csiph-web