staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures
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
@@ -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
A message that is not in the archive (sent off-list or not yet received): CALRxmdCJSswjVj+DfKD9kWAOL0mpStHB5nqRFBghr91XGCA5Yw@mail.gmail.com
Quoted 37 lines
-----Original Message-----
From: Stuart Yoder <[email protected]>
Date: Mon, Apr 11, 2016 at 11:56 AM
Subject: [PATCH 13/14] staging: fsl-mc: return-EINVALfor allfsl_mc_portal_allocate()failures
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Horia Geantă <[email protected]>, Stuart Yoder <[email protected]>From: Horia Geantă <[email protected]>
There are some error paths that allow for a NULL
new_mc_ioand err = 0 return code. Return-EINVALinstead.Signed-off-by Horia Geantă <[email protected]>Signed-off-by Stuart Yoder <[email protected]>--- drivers/staging/fsl-mc/bus/mc-allocator.c | 1 + 1 file changed, 1 insertion(+)drivers/staging/fsl-mc/bus/mc-allocator.c +1
-0@@ -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;
Quoted 2 lines
--
1.7.9.5
I had smtp mail server weirdness that led me to belive that the freescale.com email addresses in this patch were causing the patch to not show up on the mailing list, so I resent [PATCH 13/14] with the email address changed to nxp.com. Then both copies of [PATCH 13/14] showed up. So please ignore the duplicated email for this patch. Both copies are identical and either either freescale.com or nxp.com are ok for the email address. nxp.com version would be preferred I guess.
Thanks,
Stuart