Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48a70e1c authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher
Browse files

drm/amdgpu: precedence bug in amdgpu_device_init()



! has higher precedence than bitwise & so we need to add parenthesis
for this to work as intended.

Fixes: 048765ad ('amdgpu: fix asic initialization for virtualized environments (v2)')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0b10029d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1535,7 +1535,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
	/* Post card if necessary */
	if (!amdgpu_card_posted(adev) ||
	    (adev->virtualization.is_virtual &&
	     !adev->virtualization.caps & AMDGPU_VIRT_CAPS_SRIOV_EN)) {
	     !(adev->virtualization.caps & AMDGPU_VIRT_CAPS_SRIOV_EN))) {
		if (!adev->bios) {
			dev_err(adev->dev, "Card not posted and no BIOS - ignoring\n");
			return -EINVAL;