[PATCH xf86-video-amdgpu 2/3] Remove pci_dev test from amdgpu_get_scrninfo

Michel Dänzer michel at daenzer.net
Fri Jan 8 01:04:55 PST 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>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_probe.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index fa68008..f74eb29 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -200,11 +200,8 @@ static Bool amdgpu_get_scrninfo(int entity_num, struct pci_device *pci_dev)
 	if (!pScrn)
 		return FALSE;
 
-	if (pci_dev) {
-		if (!amdgpu_kernel_mode_enabled(pScrn, pci_dev)) {
-			return FALSE;
-		}
-	}
+	if (!amdgpu_kernel_mode_enabled(pScrn, pci_dev))
+		return FALSE;
 
 	pScrn->driverVersion = AMDGPU_VERSION_CURRENT;
 	pScrn->driverName = AMDGPU_DRIVER_NAME;
-- 
2.6.2



More information about the xorg-driver-ati mailing list