Re: [PATCHv2 04/16] [media] rcar-vin: return correct error from platform_get_irq

2016-07-19 Thread Sergei Shtylyov

Hello.

On 07/19/2016 05:20 PM, Niklas Söderlund wrote:


Fix a error from the original driver where the wrong error code is
returned if the driver fails to get a IRQ number from
platform_get_irq().

Signed-off-by: Niklas Söderlund 
---
 drivers/media/platform/rcar-vin/rcar-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-core.c 
b/drivers/media/platform/rcar-vin/rcar-core.c
index 481d82a..ff27d75 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -318,7 +318,7 @@ static int rcar_vin_probe(struct platform_device *pdev)

irq = platform_get_irq(pdev, 0);
if (irq <= 0)
-   return ret;
+   return irq;


   This is still wrong, i.e. it'll return 0 from the probe() method if 'irq' 
is 0 (and you consider that an error).


[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv2 04/16] [media] rcar-vin: return correct error from platform_get_irq

2016-07-19 Thread Niklas Söderlund
Fix a error from the original driver where the wrong error code is
returned if the driver fails to get a IRQ number from
platform_get_irq().

Signed-off-by: Niklas Söderlund 
---
 drivers/media/platform/rcar-vin/rcar-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-core.c 
b/drivers/media/platform/rcar-vin/rcar-core.c
index 481d82a..ff27d75 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -318,7 +318,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
 
irq = platform_get_irq(pdev, 0);
if (irq <= 0)
-   return ret;
+   return irq;
 
ret = rvin_dma_probe(vin, irq);
if (ret)
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html