mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 17:33:01 +00:00
drm/nouveau: remove unnecessary null pointer check from nouveau_fence_new
the variable chan is dereferenced in line 190, so it is no reason to check null again in line 198. Signed-off-by: Cong Ding <dinggnu@gmail.com> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
fd69aee427
commit
b5d8f05204
@ -195,11 +195,9 @@ nouveau_fence_new(struct nouveau_channel *chan, struct nouveau_fence **pfence)
|
||||
return -ENOMEM;
|
||||
kref_init(&fence->kref);
|
||||
|
||||
if (chan) {
|
||||
ret = nouveau_fence_emit(fence, chan);
|
||||
if (ret)
|
||||
nouveau_fence_unref(&fence);
|
||||
}
|
||||
ret = nouveau_fence_emit(fence, chan);
|
||||
if (ret)
|
||||
nouveau_fence_unref(&fence);
|
||||
|
||||
*pfence = fence;
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user