diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2016-04-11 16:56:16 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 01:00:45 (GMT) |
commit | 633440505f16f645d22f2d7f8367125ab89123f8 (patch) | |
tree | 6b12e023c584a74e7f7220b7fcf07d16e468b0b5 /drivers | |
parent | 01f9330846a3aa314a4b784499724b05803f24e6 (diff) | |
download | linux-633440505f16f645d22f2d7f8367125ab89123f8.tar.xz |
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: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fsl-mc/bus/mc-allocator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c index e02d5e5..fb08f22 100644 --- a/drivers/staging/fsl-mc/bus/mc-allocator.c +++ b/drivers/staging/fsl-mc/bus/mc-allocator.c @@ -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; |