summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/arche-apb-ctrl.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-01-11 11:29:09 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-11 15:58:01 -0800
commit977ff250755f4ae01ef50e98d792fabebb199c34 (patch)
treea38ab97ad7c7b604c651b206212b937a32559672 /drivers/staging/greybus/arche-apb-ctrl.c
parent3b538c399c3273ec268f7c641c8ce35c1235763a (diff)
downloadop-kernel-dev-977ff250755f4ae01ef50e98d792fabebb199c34.zip
op-kernel-dev-977ff250755f4ae01ef50e98d792fabebb199c34.tar.gz
greybus: arche-apb: platform data 'apb' is guaranteed to be valid
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>
Diffstat (limited to 'drivers/staging/greybus/arche-apb-ctrl.c')
-rw-r--r--drivers/staging/greybus/arche-apb-ctrl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 4fe2d11..3d71093 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -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);
OpenPOWER on IntegriCloud