nfit: use devm_add_action_or_reset()
If devm_add_action() fails, we are explicitly calling the cleanup to free the resources allocated. Lets use the helper devm_add_action_or_reset() and return directly in case of error, since the cleanup function has been already called by the helper if there was any error. Signed-off-by: NVikas C Sajjan <vikas.cha.sajjan@hpe.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NLee, Chun-Yi <jlee@suse.com> Signed-off-by: NDan Williams <dan.j.williams@intel.com>
Showing
想要评论请 注册 或 登录