From: Viresh Kumar Date: Mon, 11 Jan 2016 05:59:03 +0000 (+0530) Subject: greybus: arche-platform: arche_pdata is guaranteed to be valid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73658f2a285dd8b53160355e619fcb59db3bb98a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: arche-platform: arche_pdata is guaranteed to be valid arche_pdata is guaranteed to be valid in arche_platform_remove(). Signed-off-by: Viresh Kumar Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index e6fe0156e128..259473cd506d 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -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);