diff mbox

[v2,1/3] drm/omap: Fail probe if irq registration fails

Message ID 50a32bad6a2bf029100e00d06fa8d26805235213.1514807171.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha Jan. 1, 2018, 11:55 a.m. UTC
Call to omap_drm_irq_install() may fail with an error code. In such a
case the driver probe should fail.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart Jan. 5, 2018, 2:34 p.m. UTC | #1
Hi Jyri,

Thank you for the patch.

On Monday, 1 January 2018 13:55:10 EET Jyri Sarha wrote:
> Call to omap_drm_irq_install() may fail with an error code. In such a
> case the driver probe should fail.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c
> b/drivers/gpu/drm/omapdrm/omap_drv.c index dd68b25..5fe2fcb 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -321,9 +321,9 @@ static int omap_modeset_init(struct drm_device *dev)
> 
>  	drm_mode_config_reset(dev);
> 
> -	omap_drm_irq_install(dev);
> +	ret = omap_drm_irq_install(dev);
> 
> -	return 0;
> +	return ret;

Nitpicking, how about just

	return omap_drm_irq_install(dev);

? With this changed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  }
> 
>  /*
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index dd68b25..5fe2fcb 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -321,9 +321,9 @@  static int omap_modeset_init(struct drm_device *dev)
 
 	drm_mode_config_reset(dev);
 
-	omap_drm_irq_install(dev);
+	ret = omap_drm_irq_install(dev);
 
-	return 0;
+	return ret;
 }
 
 /*