Commit 4cb2e89f authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kees Cook

nouveau/svm: Split assignment from if conditional

Fix checkpatch.pl ERROR: do not use assignment in if condition.
Signed-off-by: default avatar"Gustavo A. R. Silva" <gustavoars@kernel.org>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/6b900e80b5587187c68efc788f5b042ca747d374.1692208802.git.gustavoars@kernel.orgSigned-off-by: default avatarKees Cook <keescook@chromium.org>
parent 6ad33b53
......@@ -1063,7 +1063,8 @@ nouveau_svm_init(struct nouveau_drm *drm)
if (drm->client.device.info.family > NV_DEVICE_INFO_V0_PASCAL)
return;
if (!(drm->svm = svm = kzalloc(struct_size(drm->svm, buffer, 1), GFP_KERNEL)))
drm->svm = svm = kzalloc(struct_size(drm->svm, buffer, 1), GFP_KERNEL);
if (!drm->svm)
return;
drm->svm->drm = drm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment