linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Staging: android: ion: Remove explicit NULL comparison using Coccinelle
@ 2016-09-28 15:28 shyam saini
  2016-10-02 14:58 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: shyam saini @ 2016-09-28 15:28 UTC (permalink / raw)
  To: labbott; +Cc: sumit.semwal, gregkh, linux-kernel, devel, arve, shyam saini

Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: shyam saini <mayhs11saini@gmail.com>
---
 drivers/staging/android/ion/ion_of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c
index 01f3067..485fb0f 100644
--- a/drivers/staging/android/ion/ion_of.c
+++ b/drivers/staging/android/ion/ion_of.c
@@ -36,7 +36,7 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
 			break;
 	}
 
-	if (compatible[i].name == NULL)
+	if (!compatible[i].name)
 		return -ENODEV;
 
 	heap->id = compatible[i].heap_id;
-- 
2.7.4

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

end of thread, other threads:[~2016-10-02 16:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 15:28 [PATCH 1/1] Staging: android: ion: Remove explicit NULL comparison using Coccinelle shyam saini
2016-10-02 14:58 ` Greg KH
2016-10-02 15:21   ` Shyam Saini
2016-10-02 15:37     ` Greg KH
2016-10-02 16:07       ` Shyam Saini
2016-10-02 16:16         ` Greg KH

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