greybus: arche-platform: arche_pdata is guaranteed to be valid
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 11 Jan 2016 05:59:03 +0000 (11:29 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 11 Jan 2016 23:58:01 +0000 (15:58 -0800)
arche_pdata is guaranteed to be valid in arche_platform_remove().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-platform.c

index e6fe0156e1284fa77cda920a3a4e311b09ff5233..259473cd506dd0f0d131313815ba146409862713 100644 (file)
@@ -179,10 +179,7 @@ static int arche_platform_remove(struct platform_device *pdev)
        struct arche_platform_drvdata *arche_pdata = platform_get_drvdata(pdev);
 
        device_for_each_child(&pdev->dev, NULL, arche_remove_child);
-
-       if (arche_pdata)
-               arche_platform_cleanup(arche_pdata);
-
+       arche_platform_cleanup(arche_pdata);
        platform_set_drvdata(pdev, NULL);
        unexport_gpios(arche_pdata);