From: jsg Date: Tue, 28 Mar 2023 00:25:50 +0000 (+0000) Subject: drm/amdgpu: fix return value check in kfd X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1370325be50cf1f34e93e05f56da36447691ab46;p=openbsd drm/amdgpu: fix return value check in kfd From Shashank Sharma dc7d4b1a6568652f51ee45b1a1e3531f1186a552 in linux-6.1.y/6.1.20 20534dbcc7b7bfb447279cdcfb0d88ee3b779a18 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_doorbell.c b/sys/dev/pci/drm/amd/amdkfd/kfd_doorbell.c index cd4e61bf049..3ac599f74fe 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_doorbell.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_doorbell.c @@ -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; }