diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-07-22 06:04:45 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-07-22 06:04:45 +0000 |
commit | 4c31c8ce464fa4e899b7c506d83c9709f9a8cdb5 (patch) | |
tree | 3863f456d266644584b2078ecef84680d4587e49 /sys/dev | |
parent | d433928c63c17fc58b24002c8a8471c21bca2a54 (diff) |
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
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915/gt/selftest_lrc.c | 8 |
1 files 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); |