From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756823AbcINMdS (ORCPT ); Wed, 14 Sep 2016 08:33:18 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34704 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755489AbcINMdQ (ORCPT ); Wed, 14 Sep 2016 08:33:16 -0400 Date: Wed, 14 Sep 2016 18:03:49 +0530 From: Sandhya Bankar To: outreachy-kernel@googlegroups.com Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] Staging: sm750fb: Use x instead of x != NULL Message-ID: <20160914123349.GA3770@sandhya> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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