Skip to contentSkip to conversation

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

PATCH In review Stuart Yoder 1 participant 1 message Apr 11, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 13/14 staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures

From: Horia Geantă <[email protected]>

There are some error paths that allow for a NULL new_mc_io and err = 0 return code. Return -EINVAL instead.

---
 drivers/staging/fsl-mc/bus/mc-allocator.c |    1 +
 1 file changed, 1 insertion(+)
drivers/staging/fsl-mc/bus/mc-allocator.c +1 -0
index 4676ba1..7ee71e7 100644
@@ -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;
Signature · 1 line
1.7.9.5