提交 63344050 编写于 作者: H Horia Geantă 提交者: Greg Kroah-Hartman

staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures

There are some error paths that allow for a NULL new_mc_io and err = 0
return code. Return -EINVAL instead.
Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: NStuart Yoder <stuart.yoder@nxp.com>
Acked-by: NGerman Rivera <german.rivera@nxp.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 01f93308
......@@ -293,6 +293,7 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
if (error < 0)
return error;
error = -EINVAL;
dpmcp_dev = resource->data;
if (WARN_ON(!dpmcp_dev))
goto error_cleanup_resource;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册