mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
drm/nouveau/nouveau: fix incorrect sizeof on args.src an args.dst
[ Upstream commit f42e4b337b327b1336c978c4b5174990a25f68a0 ]
The sizeof is currently on args.src and args.dst and should be on
*args.src and *args.dst. Fortunately these sizes just so happen
to be the same size so it worked, however, this should be fixed
and it also cleans up static analysis warnings
Addresses-Coverity: ("sizeof not portable")
Fixes: f268307ec7 ("nouveau: simplify nouveau_dmem_migrate_vma")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d34ecf4949
commit
531d0ac5fb
1 changed files with 2 additions and 2 deletions
|
|
@ -635,10 +635,10 @@ nouveau_dmem_migrate_vma(struct nouveau_drm *drm,
|
|||
unsigned long c, i;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
args.src = kcalloc(max, sizeof(args.src), GFP_KERNEL);
|
||||
args.src = kcalloc(max, sizeof(*args.src), GFP_KERNEL);
|
||||
if (!args.src)
|
||||
goto out;
|
||||
args.dst = kcalloc(max, sizeof(args.dst), GFP_KERNEL);
|
||||
args.dst = kcalloc(max, sizeof(*args.dst), GFP_KERNEL);
|
||||
if (!args.dst)
|
||||
goto out_free_src;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue