Skip to content

Commit 20534db

Browse files
contactshashanksharmaalexdeucher
authored andcommitted
drm/amdgpu: fix return value check in kfd
This patch fixes a return value check in kfd doorbell handling. This function should return 0(error) only when the ida_simple_get returns < 0(error), return > 0 is a success case. Cc: Felix Kuehling <[email protected]> Cc: Alex Deucher <[email protected]> Fixes: 16f0013 ("drm/amdkfd: Allocate doorbells only when needed") Acked-by: Christian Koenig <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Shashank Sharma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1717cc5 commit 20534db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ phys_addr_t kfd_get_process_doorbells(struct kfd_process_device *pdd)
280280
if (!pdd->doorbell_index) {
281281
int r = kfd_alloc_process_doorbells(pdd->dev,
282282
&pdd->doorbell_index);
283-
if (r)
283+
if (r < 0)
284284
return 0;
285285
}
286286

0 commit comments

Comments
 (0)