drm/gud: Fix descriptor magic check
Subsystems (3)
PATCH 1/1 drm/gud: Fix descriptor magic check
le32_to_cpu() was put around the wrong operand in the descriptor magic value check. Fix this and put it around the descriptor value which is the one that is in little endian format.
Fixes 40e1a70 ("drm: Add GUD USB Display driver")
Reported-by kernel test robot <[email protected]>
Signed-off-by Noralf Trønnes <[email protected]>
--- drivers/gpu/drm/gud/gud_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gud/gud_drv.c +1 -1
@@ -92,7 +92,7 @@ static int gud_get_display_descriptor(struct usb_interface *intf,if (ret !=sizeof (*desc))return -EIO ; -if (desc->magic !=le32_to_cpu (GUD_DISPLAY_MAGIC )) +if (le32_to_cpu (desc->magic) !=GUD_DISPLAY_MAGIC )return -ENODATA ; DRM_DEV_DEBUG_DRIVER(&intf->dev,
Signature · 1 line
2.33.0