Skip to contentSkip to conversation

fpga: socfpga: Fix check of return value of devm_request_irq

RFC Superseded Moritz Fischer 3 participants 3 messages Oct 22, 2015 – Oct 25, 2015 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

RFC 1/1 fpga: socfpga: Fix check of return value of devm_request_irq

The return value should be checked for non-zero, instead of checking it being IS_ERR_VALUE().

---
 drivers/fpga/socfpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/socfpga.c +1 -1
index 706b80d..27d2ff2 100644
@@ -577,7 +577,7 @@ static int socfpga_fpga_probe(struct platform_device *pdev)
 
 	ret = devm_request_irq(dev, priv->irq, socfpga_fpga_isr, 0,
 			       dev_name(dev), priv);
-	if (IS_ERR_VALUE(ret))
+	if (ret)
 		return ret;
 
 	return fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager",
Signature · 1 line
2.4.3
Acked-by on v1 1/1
#1 lore raw

On Thu, 22 Oct 2015, Moritz Fischer wrote:

Hi Moritz,

Thank you, yes this is better.

I don't know if I need to ack everything, but here it is anyway:

Alan

Quoted 25 lines

The return value should be checked for non-zero, instead of checking it being IS_ERR_VALUE().

---
 drivers/fpga/socfpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/socfpga.c +1 -1
index 706b80d..27d2ff2 100644
@@ -577,7 +577,7 @@ static int socfpga_fpga_probe(struct platform_device *pdev)
 
 	ret = devm_request_irq(dev, priv->irq, socfpga_fpga_isr, 0,
 			       dev_name(dev), priv);
-	if (IS_ERR_VALUE(ret))
+	if (ret)
 		return ret;
 
 	return fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager",
Signature · 1 line
2.4.3
Reviewed-by
#2 lore raw
Quoted 6 lines · atull
Quoted 4 lines

The return value should be checked for non-zero, instead of checking it being IS_ERR_VALUE().

On Thu, 22 Oct 2015, Moritz Fischer wrote:

Quoted 8 lines

Hi Moritz,

Thank you, yes this is better.

I don't know if I need to ack everything, but here it is anyway:

Because Greg is the one picking up patches for the FPGA manager stuff right now, you'll want to make sure he's at least CC'd. A proper resend would likely be the easiest way for him to pick it up.

Feel free to add by Reviewed-by as well:

Thanks,
Josh

Quoted 26 lines
Quoted 21 lines
---
 drivers/fpga/socfpga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/socfpga.c +1 -1
index 706b80d..27d2ff2 100644
@@ -577,7 +577,7 @@ static int socfpga_fpga_probe(struct platform_device *pdev)
 
 	ret = devm_request_irq(dev, priv->irq, socfpga_fpga_isr, 0,
 			       dev_name(dev), priv);
-	if (IS_ERR_VALUE(ret))
+	if (ret)
 		return ret;
 
 	return fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager",
Signature · 1 line
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/