drm: Reject fbs w/o format info in drm_framebuffer_init()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Nov 2016 19:52:58 +0000 (21:52 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 15 Dec 2016 12:55:30 +0000 (14:55 +0200)
commit570cec3244447f21f5b24c3a75151b4166e30d95
tree91a269fb799c4a7c90f6aef0b4a59f38fa0e3e4d
parent2f3f4763c1ba9348984ed67aa60a16c86a9dab1c
drm: Reject fbs w/o format info in drm_framebuffer_init()

Any framebuffer that doesn't have proper format information when
drm_framebuffer_init() is called is a bug. Let's warn and return
an error to avoid oopsing the kernel later due to dereferencing the
NULL fb->format pointer.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-23-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/drm_framebuffer.c