mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stuart Yoder <stuart.yoder@nxp.com>
To: <gregkh@linuxfoundation.org>, <german.rivera@nxp.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	agraf@suse.de, arnd@arndb.de, leoyang.li@nxp.com,
	"Horia Geantă" <horia.geanta@nxp.com>,
	"Stuart Yoder" <stuart.yoder@nxp.com>
Subject: [PATCH 13/14] staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures
Date: Mon, 11 Apr 2016 11:56:16 -0500	[thread overview]
Message-ID: <1460393776-16500-1-git-send-email-stuart.yoder@nxp.com> (raw)

From: Horia Geantă <horia.geanta@nxp.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@nxp.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

             reply	other threads:[~2016-04-11 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 16:56 Stuart Yoder [this message]
     [not found] ` <CALRxmdCJSswjVj+DfKD9kWAOL0mpStHB5nqRFBghr91XGCA5Yw@mail.gmail.com>
2016-04-11 23:14   ` Stuart Yoder
  -- strict thread matches above, loose matches on Subject: below --
2016-04-11 16:50 Stuart Yoder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460393776-16500-1-git-send-email-stuart.yoder@nxp.com \
    --to=stuart.yoder@nxp.com \
    --cc=agraf@suse.de \
    --cc=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=german.rivera@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=horia.geanta@nxp.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome