greybus: arche-platform: Fix exit path in probe fn
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Wed, 24 Feb 2016 20:57:36 +0000 (02:27 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 25 Feb 2016 01:36:16 +0000 (17:36 -0800)
commit6743a6fd963aba000b128fd0b5c420a8f4b0dcde
treed4b0a499295382052cb80fb87a028ffba54e8976
parentc5f338c4a040d7d6eefc560f3ee5cdb6ede03b74
greybus: arche-platform: Fix exit path in probe fn

If SVC coldboot fails or if of_platform_populate() fn fails,
then state of device needs to be reverted.

Importantly, if of_platform_populate() fails, then poweroff the SVC.

Testing Done: Tested on DB3.5 platform.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Reviewed-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-platform.c