lkml.org 
[lkml]   [2015]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] mfd: remove unnecessary check
On Wed, 01 Jul 2015, Lee Jones wrote:
> On Tue, 30 Jun 2015, Maninder Singh wrote:
>
> > o Making pdata NULL check to (!pdata) as coding statndard
> > 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 <maninder1.s@samsung.com>
> > Reviewed-by: Vaneet Narang <v.narang@samsung.com>
> > ---
> > drivers/mfd/t7l66xb.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Applied, with a properly formatted subject line.

Should have probably been more forthcomming with some advice.

Next time, please use `git log --oneline -- <subsystem>` to see what
the accepted format is.

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


\
 
 \ /
  Last update: 2015-07-01 10:01    [W:0.064 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site