[PATCH 1/1] Staging: android: ion: Remove explicit NULL comparison using Coccinelle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: shyam saini <mayhs11saini@xxxxxxxxx>
---
 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux