Commit 73658f2a authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: arche-platform: arche_pdata is guaranteed to be valid

arche_pdata is guaranteed to be valid in arche_platform_remove().
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent fc41c2da
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment