From 73658f2a285dd8b53160355e619fcb59db3bb98a Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 11 Jan 2016 11:29:03 +0530 Subject: [PATCH] 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 --- drivers/staging/greybus/arche-platform.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); -- 2.20.1