OSDN Git Service

drm/vmwgfx: Fix return value check in vmw_setup_pci_resources()
authorQiheng Lin <linqiheng@huawei.com>
Fri, 14 May 2021 08:28:12 +0000 (16:28 +0800)
committerZack Rusin <zackr@vmware.com>
Fri, 14 May 2021 18:39:14 +0000 (14:39 -0400)
commit527a9471878e619add51825640a76d9777218445
tree8dd5c2ada64f364424ccc0418cd035a4f23e145e
parent2f70cbf79e3ffa65ab2faeec9ba7e6e587e6cad9
drm/vmwgfx: Fix return value check in vmw_setup_pci_resources()

In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR().
The IS_ERR() test in the return value check should be replaced with NULL test.
After that, the error code -ENOMEM should be returned.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210514082812.1697-1-linqiheng@huawei.com
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c