drm/amdgpu: fix return value check in kfd
authorjsg <jsg@openbsd.org>
Tue, 28 Mar 2023 00:25:50 +0000 (00:25 +0000)
committerjsg <jsg@openbsd.org>
Tue, 28 Mar 2023 00:25:50 +0000 (00:25 +0000)
From Shashank Sharma
dc7d4b1a6568652f51ee45b1a1e3531f1186a552 in linux-6.1.y/6.1.20
20534dbcc7b7bfb447279cdcfb0d88ee3b779a18 in mainline linux

sys/dev/pci/drm/amd/amdkfd/kfd_doorbell.c

index cd4e61b..3ac599f 100644 (file)
@@ -280,7 +280,7 @@ phys_addr_t kfd_get_process_doorbells(struct kfd_process_device *pdd)
        if (!pdd->doorbell_index) {
                int r = kfd_alloc_process_doorbells(pdd->dev,
                                                    &pdd->doorbell_index);
-               if (r)
+               if (r < 0)
                        return 0;
        }