提交 632de8f5 编写于 作者: S Sudeep Holla

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: NJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
上级 ec42ac6d
...@@ -687,11 +687,12 @@ static int scmi_remove(struct platform_device *pdev) ...@@ -687,11 +687,12 @@ static int scmi_remove(struct platform_device *pdev)
list_del(&info->node); list_del(&info->node);
mutex_unlock(&scmi_list_mutex); mutex_unlock(&scmi_list_mutex);
if (!ret) { if (ret)
return ret;
/* Safe to free channels since no more users */ /* Safe to free channels since no more users */
ret = idr_for_each(idr, scmi_mbox_free_channel, idr); ret = idr_for_each(idr, scmi_mbox_free_channel, idr);
idr_destroy(&info->tx_idr); idr_destroy(&info->tx_idr);
}
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册