lkml.org 
[lkml]   [2016]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/14] staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures
Date
From: Horia Geantă <horia.geanta@freescale.com>

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@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
---
drivers/staging/fsl-mc/bus/mc-allocator.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 4676ba1..7ee71e7 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -306,6 +306,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;
--
1.7.9.5
\
 
 \ /
  Last update: 2016-04-11 19:21    [W:0.027 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site