firmware: arm_scmi: improve exit paths and code readability
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 9 May 2018 16:52:06 +0000 (17:52 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Thu, 10 May 2018 09:51:59 +0000 (10:51 +0100)
commitec42ac6d1ea3118210c265ea532b2ab66e18098d
treeaa116c43e01e1ce199b1451312616264788748b8
parent8f3397ccb63ac3b0ddcc759565bcd66977c4eb1a
firmware: arm_scmi: improve exit paths and code readability

The existing code intends the good path to reduce the code which is so
uncommon. It's obvious to have more readable code with a goto used for
the error path. This patch adds more appropriate error paths and makes
code more readable. It also moves a error logging outside the scope of
locking.

Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/bus.c