drm/client: Fix error code in drm_client_buffer_vmap_local()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 24 Jul 2024 16:09:54 +0000 (11:09 -0500)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 29 Jul 2024 06:50:23 +0000 (08:50 +0200)
commitb5fbf924f125ba3638cfdc21c0515eb7e76264ca
treec3fef01dcadc19f4e498fe492a5c557e30807726
parent75c3e8a26a35d4f3eee299b3cc7e465f166f4e2d
drm/client: Fix error code in drm_client_buffer_vmap_local()

This function accidentally returns zero/success on the failure path.
It leads to locking issues and an uninitialized *map_copy in the
caller.

Fixes: b4b0193e83cb ("drm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/89d13df3-747c-4c5d-b122-d081aef5110a@stanley.mountain
drivers/gpu/drm/drm_client.c