mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()
In case of error, the function live_context() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes:52c0fdb25c
("drm/i915: Replace global breadcrumbs with per-context interrupt tracking") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/33c46ef24cd547d0ad21dc106441491a@intel.com [tursulin: Wrap commit text, fix Fixes: tag.] Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (cherry picked from commit8f4caef8d5
) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
8124c8a6b3
commit
10c1f0cbce
@ -1592,8 +1592,8 @@ static int live_breadcrumbs_smoketest(void *arg)
|
||||
|
||||
for (n = 0; n < smoke[0].ncontexts; n++) {
|
||||
smoke[0].contexts[n] = live_context(i915, file);
|
||||
if (!smoke[0].contexts[n]) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(smoke[0].contexts[n])) {
|
||||
ret = PTR_ERR(smoke[0].contexts[n]);
|
||||
goto out_contexts;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user