greybus: arche-platform: Put APB in reset if of_platform_populate() fails
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 11 Jan 2016 05:59:05 +0000 (11:29 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 11 Jan 2016 23:58:01 +0000 (15:58 -0800)
commit72a8c24b6dcae46c4e8c37c1b1d1adb6e6b8a72f
treec7e908606e0883364965682fb6621fc8d411a59e
parent8adf71d1b43aa1c449d22dd8e6f6c29957872a7f
greybus: arche-platform: Put APB in reset if of_platform_populate() fails

The current implementation around of_platform_populate() is not so
great. On error, we first print an error message, followed by a success
message and finally we return an error.

And over that we don't undo what we did initially.

This patch puts the APB back into reset and create a separate error
path to make things clear.

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>
drivers/staging/greybus/arche-platform.c