Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755294AbbGGHSW (ORCPT ); Tue, 7 Jul 2015 03:18:22 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38715 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754027AbbGGHSN (ORCPT ); Tue, 7 Jul 2015 03:18:13 -0400 Date: Tue, 7 Jul 2015 08:18:09 +0100 From: Lee Jones To: Maninder Singh Cc: sameo@linux.intel.com, linux-kernel@vger.kernel.org, k.kozlowski@samsung.com, pankaj.m@samsung.com Subject: Re: [PATCH v2] mfd : t7l66xb: remove unnecessary pdata check Message-ID: <20150707071809.GM3182@x1> References: <1435807378-18692-1-git-send-email-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1435807378-18692-1-git-send-email-maninder1.s@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1499 Lines: 49 On Thu, 02 Jul 2015, Maninder Singh wrote: > o Making pdata NULL check to (!pdata) as coding standard > and all other checks in file. > o Removing redundant check of pdata, because we already > check for pdata, and also derefernced before this check. > > Signed-off-by: Maninder Singh > --- > v2: changing subject line. > > drivers/mfd/t7l66xb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c > index c09fb5d..854b05f 100644 > --- a/drivers/mfd/t7l66xb.c > +++ b/drivers/mfd/t7l66xb.c > @@ -318,7 +318,7 @@ static int t7l66xb_probe(struct platform_device *dev) > struct resource *iomem, *rscr; > int ret; > > - if (pdata == NULL) > + if (!pdata) > return -EINVAL; > > iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); > @@ -371,7 +371,7 @@ static int t7l66xb_probe(struct platform_device *dev) > > clk_prepare_enable(t7l66xb->clk48m); > > - if (pdata && pdata->enable) > + if (pdata->enable) > pdata->enable(dev); > > /* Mask all interrupts */ -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/