drm/omap: handle error if scale coefs are not found
authorTomi Valkeinen <[email protected]>
Wed, 2 May 2018 09:11:57 +0000 (12:11 +0300)
committerSean Paul <[email protected]>
Mon, 7 May 2018 14:19:12 +0000 (10:19 -0400)
commite1cdab6e5f9a52e0bdf34363ec0fdab0e2328ba9
tree486480c0937ea85acd63ff2d137cb9700e2c9f13
parent4d6cb5e2fee52af17001e92950f0894304706ee4
drm/omap: handle error if scale coefs are not found

If get_scale_coef functions fail, they return NULL, but we never check
the return value and could do a NULL deref. This should not happen as we
ought to validate the amount of scaling already earlier, but to be safe,
add the necessary check.

Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Benoit Parrot <[email protected]>
Reviewed-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
drivers/gpu/drm/omapdrm/dss/dispc.c