From 977ff250755f4ae01ef50e98d792fabebb199c34 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 11 Jan 2016 11:29:09 +0530 Subject: [PATCH] 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 Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/arche-apb-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index 4fe2d110c4ae..3d71093c4697 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); -- 2.20.1