diff mbox

drm/i915: Fix an error handling in 'intel_framebuffer_init()'

Message ID 20170910085642.13673-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Christophe JAILLET Sept. 10, 2017, 8:56 a.m. UTC
We should go through the error handling path to decrease the
'framebuffer_references' as done everywhere else in this function.

Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula Sept. 11, 2017, 12:02 p.m. UTC | #1
On Sun, 10 Sep 2017, Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> We should go through the error handling path to decrease the
> 'framebuffer_references' as done everywhere else in this function.
>
> Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Pushed to drm-intel-next-queued, thanks for the patch.

For future reference, the intel-gfx list will suffice.


BR,
Jani.


> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 7cd392f2cd94..478fa449003f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14077,7 +14077,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
>  
>  		if (mode_cmd->handles[i] != mode_cmd->handles[0]) {
>  			DRM_DEBUG_KMS("bad plane %d handle\n", i);
> -			return -EINVAL;
> +			goto err;
>  		}
>  
>  		stride_alignment = intel_fb_stride_alignment(fb, i);
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7cd392f2cd94..478fa449003f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14077,7 +14077,7 @@  static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 
 		if (mode_cmd->handles[i] != mode_cmd->handles[0]) {
 			DRM_DEBUG_KMS("bad plane %d handle\n", i);
-			return -EINVAL;
+			goto err;
 		}
 
 		stride_alignment = intel_fb_stride_alignment(fb, i);