Message ID | 802e7cedf8a697deeef3f143cc1068520b35f2f6.1518001667.git.jsarha@ti.com |
---|---|
State | Superseded |
Headers | show |
Series | drm/omap: Make omapdss API more generic + related patches | expand |
On 07/02/18 14:10, 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 71ea43f..e6e7a2c 100644 > --- a/drivers/gpu/drm/omapdrm/omap_drv.c > +++ b/drivers/gpu/drm/omapdrm/omap_drv.c > @@ -329,9 +329,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; > } It's better to do "if (ret) return ret;" so that it's easy (and less error prone) to modify the code later. Other than that: Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tomi
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 71ea43f..e6e7a2c 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -329,9 +329,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; } /*
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(-)