From: Viresh Kumar Date: Mon, 11 Jan 2016 05:59:09 +0000 (+0530) Subject: greybus: arche-apb: platform data 'apb' is guaranteed to be valid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=977ff250755f4ae01ef50e98d792fabebb199c34;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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);