mfd: t7l66xb: Remove unnecessary pdata check
authorManinder Singh <maninder1.s@samsung.com>
Thu, 2 Jul 2015 03:22:58 +0000 (08:52 +0530)
committerLee Jones <lee.jones@linaro.org>
Tue, 11 Aug 2015 14:08:44 +0000 (15:08 +0100)
 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 <maninder1.s@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/t7l66xb.c

index c09fb5dccd50a20afa439e9b2e47220ca18f5759..854b05f840bbbeb03b6f1c30906a62bb97d00a3d 100644 (file)
@@ -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 */