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


Groups > linux.kernel > #1483238

[PATCH] Staging: sm750fb: Use x instead of x != NULL

From Sandhya Bankar <bankarsandhya512@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] Staging: sm750fb: Use x instead of x != NULL
Date 2016-09-14 14:40 +0200
Message-ID <shhDQ-SQ-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Use x instead of x != NULL .
This patch removes the explicit NULL comparisons.This issue is found by checkpatch.pl script .
CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit" 

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
index a4a2550..8a39e0e 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -45,7 +45,7 @@ int dviInit(
 	dvi_ctrl_device_t *pCurrentDviCtrl;
 
 	pCurrentDviCtrl = g_dcftSupportedDviController;
-	if (pCurrentDviCtrl->pfnInit != NULL) {
+	if (pCurrentDviCtrl->pfnInit) {
 		return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
 						vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
 						pllFilterEnable, pllFilterValue);
-- 
1.8.2.3

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] Staging: sm750fb: Use x instead of x != NULL Sandhya Bankar <bankarsandhya512@gmail.com> - 2016-09-14 14:40 +0200
  Re: [Outreachy kernel] [PATCH] Staging: sm750fb: Use x instead of  x != NULL Julia Lawall <julia.lawall@lip6.fr> - 2016-09-14 14:40 +0200

csiph-web