greybus: arche-apb: platform data 'apb' is guaranteed to be valid
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 11 Jan 2016 05:59:09 +0000 (11:29 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 11 Jan 2016 23:58:01 +0000 (15:58 -0800)
Platform data 'apb' is guaranteed to be valid in arche_apb_ctrl_remove()
and so no need to check it.

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-apb-ctrl.c

index 4fe2d11..3d71093 100644 (file)
@@ -352,9 +352,7 @@ int arche_apb_ctrl_remove(struct platform_device *pdev)
 {
        struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
 
-       if (apb)
-               apb_ctrl_cleanup(apb);
-
+       apb_ctrl_cleanup(apb);
        platform_set_drvdata(pdev, NULL);
        unexport_gpios(apb);