Skip to contentSkip to conversation

Patch "can: rcar_can: fix IRQ check" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Aug 6, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

can: rcar_can: fix IRQ check

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
can-rcar_can-fix-irq-check.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 5e63e6baa159fa8c787cf783dbf3d77fbea97331 Mon Sep 17 00:00:00 2001

From: Sergei Shtylyov <[email protected]>
Date: Sat, 20 Jun 2015 03:32:46 +0300
Subject: can: rcar_can: fix IRQ check

From: Sergei Shtylyov <[email protected]>

commit 5e63e6baa159fa8c787cf783dbf3d77fbea97331 upstream.

rcar_can_probe() regards 0 as a wrong IRQ #, despite platform_get_irq() that it calls returns negative error code in that case. This leads to the following being printed to the console when attempting to open the device:

error requesting interrupt fffffffa

because rcar_can_open() calls request_irq() with a negative IRQ #, and that function naturally fails with -EINVAL.

Check for the negative error codes instead and propagate them upstream instead of just returning -ENODEV.

Fixes fd1159318e55 ("can: add Renesas R-Car CAN driver")
---
 drivers/net/can/rcar_can.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/rcar_can.c +2 -1
@@ -758,8 +758,9 @@ static int rcar_can_probe(struct platfor
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (!irq) {
+	if (irq < 0) {
 		dev_err(&pdev->dev, "No IRQ resource\n");
+		err = irq;
 		goto fail;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/can-rcar_can-fix-irq-check.patch
queue-4.1/can-rcar_can-print-signed-irq.patch