Commit 2d6d8b13 authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

drm/bochs: Return error from correct pointer



In probe, return the error code from the variable bochs, not dev. The
variable dev has not been initialized at this point. In the case of an
allocation error, the returned value would have been undefined.

Reported-by: default avatarKees Bakker <kees@ijzerbout.nl>
Closes: https://lore.kernel.org/dri-devel/8c5bfc12-cbcc-4102-9826-494060df4179@ijzerbout.nl/


Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Fixes: 04826f58 ("drm/bochs: Allocate DRM device in struct bochs_device")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux.dev
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241004075404.41743-1-tzimmermann@suse.de
parent 6b3815c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment