All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Tony Lindgren <tony@atomide.com>, Russell King <linux@armlinux.org.uk>
Cc: linux-omap@vger.kernel.org, Wei Yongjun <weiyongjun1@huawei.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next] ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
Date: Fri, 13 Oct 2017 09:29:25 +0000	[thread overview]
Message-ID: <1507886965-156349-1-git-send-email-weiyongjun1@huawei.com> (raw)

Fix to return error code -EINVAL from the irq_of_parse_and_map() error
handling case instead of 0, as done elsewhere in this function.

Fixes: d85a2d61432a ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 arch/arm/mach-omap2/omap_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 713fc6b..d45cbfd 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -433,8 +433,10 @@ void omap_device_delete(struct omap_device *od)
 		irq = irq_of_parse_and_map(child, 0);
 	if (!irq)
 		irq = irq_of_parse_and_map(np, 0);
-	if (!irq)
+	if (!irq) {
+		error = -EINVAL;
 		goto free;
+	}
 
 	/* Legacy DMA code needs interrupt name to be "0" */
 	res[1].start = irq;

WARNING: multiple messages have this Message-ID (diff)
From: weiyongjun1@huawei.com (Wei Yongjun)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next] ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
Date: Fri, 13 Oct 2017 09:29:25 +0000	[thread overview]
Message-ID: <1507886965-156349-1-git-send-email-weiyongjun1@huawei.com> (raw)

Fix to return error code -EINVAL from the irq_of_parse_and_map() error
handling case instead of 0, as done elsewhere in this function.

Fixes: d85a2d61432a ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 arch/arm/mach-omap2/omap_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 713fc6b..d45cbfd 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -433,8 +433,10 @@ void omap_device_delete(struct omap_device *od)
 		irq = irq_of_parse_and_map(child, 0);
 	if (!irq)
 		irq = irq_of_parse_and_map(np, 0);
-	if (!irq)
+	if (!irq) {
+		error = -EINVAL;
 		goto free;
+	}
 
 	/* Legacy DMA code needs interrupt name to be "0" */
 	res[1].start = irq;

             reply	other threads:[~2017-10-13  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  9:29 Wei Yongjun [this message]
2017-10-13  9:29 ` [PATCH -next] ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources() Wei Yongjun
2017-10-13 17:08 ` Tony Lindgren
2017-10-13 17:08   ` Tony Lindgren

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=1507886965-156349-1-git-send-email-weiyongjun1@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.