0336-drm-vc4-Fix-NULL-deref-in-HDMI-init-error-path.patch 786 B

12345678910111213141516171819202122232425
  1. From 00dc0773c1af03a24f76c53223ab0c3d1fc7debb Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Mon, 4 Apr 2016 14:25:59 -0700
  4. Subject: [PATCH 336/381] drm/vc4: Fix NULL deref in HDMI init error path
  5. If you make it here other than through err_destroy_encoder, vc4->hdmi
  6. is still NULL.
  7. Signed-off-by: Eric Anholt <eric@anholt.net>
  8. (cherry picked from commit 5883980313af70aec0ceebaef6ef0709726e5e63)
  9. ---
  10. drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  11. 1 file changed, 1 insertion(+), 1 deletion(-)
  12. --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
  13. +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
  14. @@ -573,7 +573,7 @@ err_unprepare_hsm:
  15. err_unprepare_pix:
  16. clk_disable_unprepare(hdmi->pixel_clock);
  17. err_put_i2c:
  18. - put_device(&vc4->hdmi->ddc->dev);
  19. + put_device(&hdmi->ddc->dev);
  20. return ret;
  21. }