[PATCH xf86-video-ati 4/6] Remove pci_dev test from amdgpu_get_scrninfo

Michel Dänzer michel at daenzer.net
Tue Feb 16 08:29:07 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

The pci_dev parameter can never be NULL since we only support KMS.

Reported-by: Tom St Denis <tom.stdenis at amd.com>
(ported from amdgpu commit 6e42c58375a4c3229da93c27bbd104af145c6163)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_probe.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 65cf0c9..6d6d8c5 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -127,11 +127,8 @@ radeon_get_scrninfo(int entity_num, void *pci_dev)
     if (!pScrn)
         return FALSE;
 
-    if (pci_dev) {
-      if (!radeon_kernel_mode_enabled(pScrn, pci_dev)) {
+    if (!radeon_kernel_mode_enabled(pScrn, pci_dev))
 	return FALSE;
-      }
-    }
 
     pScrn->driverVersion = RADEON_VERSION_CURRENT;
     pScrn->driverName    = RADEON_DRIVER_NAME;
-- 
2.7.0



More information about the xorg-driver-ati mailing list