From 26d8f8a60a1fadecad821c65303457887c316c4c Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 22 Jul 2022 06:04:44 +0000 Subject: [PATCH] drm/i915/selftests: fix a couple IS_ERR() vs NULL tests From Dan Carpenter 40c12fc520234b0145bb776f38642507180dfad8 in linux 5.15.y/5.15.56 896dcabd1f8f613c533d948df17408c41f8929f5 in mainline linux --- sys/dev/pci/drm/i915/gt/selftest_lrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/drm/i915/gt/selftest_lrc.c b/sys/dev/pci/drm/i915/gt/selftest_lrc.c index b0977a3b699..bc2950fbbaf 100644 --- a/sys/dev/pci/drm/i915/gt/selftest_lrc.c +++ b/sys/dev/pci/drm/i915/gt/selftest_lrc.c @@ -153,8 +153,8 @@ static int live_lrc_layout(void *arg) continue; hw = shmem_pin_map(engine->default_state); - if (IS_ERR(hw)) { - err = PTR_ERR(hw); + if (!hw) { + err = -ENOMEM; break; } hw += LRC_STATE_OFFSET / sizeof(*hw); @@ -329,8 +329,8 @@ static int live_lrc_fixed(void *arg) continue; hw = shmem_pin_map(engine->default_state); - if (IS_ERR(hw)) { - err = PTR_ERR(hw); + if (!hw) { + err = -ENOMEM; break; } hw += LRC_STATE_OFFSET / sizeof(*hw); -- 2.20.1