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 <viresh.kumar@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Viresh Kumar
2016-01-11 11:29:09 +05:30
committed by Greg Kroah-Hartman
parent 3b538c399c
commit 977ff25075

View File

@@ -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);