Skip to content

Commit 4cb2e89

Browse files
GustavoARSilvakees
authored andcommitted
nouveau/svm: Split assignment from if conditional
Fix checkpatch.pl ERROR: do not use assignment in if condition. Signed-off-by: "Gustavo A. R. Silva" <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/6b900e80b5587187c68efc788f5b042ca747d374.1692208802.git.gustavoars@kernel.org Signed-off-by: Kees Cook <[email protected]>
1 parent 6ad33b5 commit 4cb2e89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_svm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,8 @@ nouveau_svm_init(struct nouveau_drm *drm)
10631063
if (drm->client.device.info.family > NV_DEVICE_INFO_V0_PASCAL)
10641064
return;
10651065

1066-
if (!(drm->svm = svm = kzalloc(struct_size(drm->svm, buffer, 1), GFP_KERNEL)))
1066+
drm->svm = svm = kzalloc(struct_size(drm->svm, buffer, 1), GFP_KERNEL);
1067+
if (!drm->svm)
10671068
return;
10681069

10691070
drm->svm->drm = drm;

0 commit comments

Comments
 (0)