linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] staging: media: lirc: replace NULL comparisons with !var
@ 2015-12-18 13:05 Sudip Mukherjee
  2015-12-18 13:05 ` [PATCH 2/5] staging: media: lirc: no space after cast Sudip Mukherjee
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Sudip Mukherjee @ 2015-12-18 13:05 UTC (permalink / raw)
  To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-kernel, linux-media, devel, Sudip Mukherjee

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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-05-25 16:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18 13:05 [PATCH 1/5] staging: media: lirc: replace NULL comparisons with !var Sudip Mukherjee
2015-12-18 13:05 ` [PATCH 2/5] staging: media: lirc: no space after cast Sudip Mukherjee
2015-12-18 13:05 ` [PATCH 3/5] staging: media: lirc: space around operator Sudip Mukherjee
2015-12-18 13:05 ` [PATCH 4/5] staging: media: lirc: place operator on previous line Sudip Mukherjee
2016-01-25 16:26   ` Mauro Carvalho Chehab
2015-12-18 13:05 ` [PATCH 5/5] staging: media: lirc: use new parport device model Sudip Mukherjee
2016-01-25 16:29   ` Mauro Carvalho Chehab
2016-01-25 17:02     ` Sudip Mukherjee
2016-01-25 17:12       ` Mauro Carvalho Chehab
2016-01-25 17:33         ` Sudip Mukherjee
2016-01-25 17:40           ` Mauro Carvalho Chehab
2016-03-03 11:49         ` Sudip Mukherjee
2016-05-25 11:54         ` Sudip Mukherjee
2015-12-30  4:28 ` [PATCH 1/5] staging: media: lirc: replace NULL comparisons with !var Sudip Mukherjee

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).