diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2018-05-09 12:52:06 -0400 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2018-05-10 05:52:00 -0400 |
commit | 632de8f542bcd44c756637da0e7d824e7129e496 (patch) | |
tree | f9cad09e2696d24b39d261e790747e74939d370b | |
parent | ec42ac6d1ea3118210c265ea532b2ab66e18098d (diff) |
firmware: arm_scmi: simplify exit path by returning on error
Yet another nasty indentation left out during code restructuring. It's
must simpler to return on error instead of having unnecessary indentation.
Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
-rw-r--r-- | drivers/firmware/arm_scmi/driver.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 4087d6c50ecd..e996395af5f2 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c | |||
@@ -687,11 +687,12 @@ static int scmi_remove(struct platform_device *pdev) | |||
687 | list_del(&info->node); | 687 | list_del(&info->node); |
688 | mutex_unlock(&scmi_list_mutex); | 688 | mutex_unlock(&scmi_list_mutex); |
689 | 689 | ||
690 | if (!ret) { | 690 | if (ret) |
691 | /* Safe to free channels since no more users */ | 691 | return ret; |
692 | ret = idr_for_each(idr, scmi_mbox_free_channel, idr); | 692 | |
693 | idr_destroy(&info->tx_idr); | 693 | /* Safe to free channels since no more users */ |
694 | } | 694 | ret = idr_for_each(idr, scmi_mbox_free_channel, idr); |
695 | idr_destroy(&info->tx_idr); | ||
695 | 696 | ||
696 | return ret; | 697 | return ret; |
697 | } | 698 | } |