mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 20:53:03 +02:00
drm/sysfb: ofdrm: Fix is_avivo() constant comparison bug
The is_avivo() function has a logic error where it compares a constant
to another constant instead of checking the device parameter:
(PCI_VENDOR_ID_ATI_R600 >= 0x9400)
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: f496834e16 ("drm/ofdrm: Add per-model device function")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: <stable@vger.kernel.org> # v6.2+
Link: https://patch.msgid.link/20260731111729.703116-1-oushixiong1025@163.com
This commit is contained in:
parent
c6f48e59ec
commit
958f35cbb8
|
|
@ -239,7 +239,7 @@ static bool is_avivo(u32 vendor, u32 device)
|
|||
/* This will match most R5xx */
|
||||
return (vendor == PCI_VENDOR_ID_ATI) &&
|
||||
((device >= PCI_VENDOR_ID_ATI_R520 && device < 0x7800) ||
|
||||
(PCI_VENDOR_ID_ATI_R600 >= 0x9400));
|
||||
(device >= PCI_VENDOR_ID_ATI_R600));
|
||||
}
|
||||
|
||||
static enum ofdrm_model display_get_model_of(struct drm_device *dev, struct device_node *of_node)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user