drm/atomic: Don't pollute crtc_state->mode_blob with error pointers
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 9 Feb 2022 09:19:27 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:08 +0000 (12:03 +0100)
commita1596e0277ed430dc2f44b61ebc2c1ecdab718e4
treeaf213959580befe8611237172c5d8c18bb28627c
parent68f3a4252e9718843bd172f9761267aa288647d0
drm/atomic: Don't pollute crtc_state->mode_blob with error pointers

commit 439cf34c8e0a8a33d8c15a31be1b7423426bc765 upstream.

Make sure we don't assign an error pointer to crtc_state->mode_blob
as that will break all kinds of places that assume either NULL or a
valid pointer (eg. drm_property_blob_put()).

Cc: stable@vger.kernel.org
Reported-by: fuyufan <fuyufan@huawei.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220209091928.14766-1-ville.syrjala@linux.intel.com
Acked-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_atomic_uapi.c