From: jsg Date: Fri, 22 Jul 2022 06:04:44 +0000 (+0000) Subject: drm/i915/selftests: fix a couple IS_ERR() vs NULL tests X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=26d8f8a60a1fadecad821c65303457887c316c4c;p=openbsd 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 --- 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);