diff mbox series

drm/amdkfd: CRIU fix a NULL vs IS_ERR() check

Message ID 20220209180925.GB18385@kili (mailing list archive)
State New, archived
Headers show
Series drm/amdkfd: CRIU fix a NULL vs IS_ERR() check | expand

Commit Message

Dan Carpenter Feb. 9, 2022, 6:09 p.m. UTC
The kfd_process_device_data_by_id() does not return error pointers,
it returns NULL.

Fixes: bef153b70c6e ("drm/amdkfd: CRIU implement gpu_id remapping")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 64e3b4e3a712..75aca99f6ece 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -2526,7 +2526,7 @@  static int criu_restore_bos(struct kfd_process *p,
 				break;
 
 			peer_pdd = kfd_process_device_data_by_id(p, bo_priv->mapped_gpuids[j]);
-			if (IS_ERR(peer_pdd)) {
+			if (!peer_pdd) {
 				ret = -EINVAL;
 				goto exit;
 			}