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" <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/6b900e80b5587187c68efc788f5b042ca747d374.1692208802.git.gustavoars@kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
6ad33b53c9
commit
4cb2e89fea
|
@ -1063,7 +1063,8 @@ nouveau_svm_init(struct nouveau_drm *drm)
|
||||||
if (drm->client.device.info.family > NV_DEVICE_INFO_V0_PASCAL)
|
if (drm->client.device.info.family > NV_DEVICE_INFO_V0_PASCAL)
|
||||||
return;
|
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;
|
return;
|
||||||
|
|
||||||
drm->svm->drm = drm;
|
drm->svm->drm = drm;
|
||||||
|
|
Loading…
Reference in New Issue