mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
drm/nouveau/mmu/r535: uninitialized variable in r535_bar_new_()
[ Upstream commit65323796de
] If gf100_bar_new_() fails then "bar" is not initialized. Fixes:5bf0257136
("drm/nouveau/mmu/r535: initial support") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/dab21df7-4d90-4479-97d8-97e5d228c714@moroto.mountain Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
de16a53c14
commit
bf21b0b98a
@ -168,12 +168,11 @@ r535_bar_new_(const struct nvkm_bar_func *hw, struct nvkm_device *device,
|
||||
rm->flush = r535_bar_flush;
|
||||
|
||||
ret = gf100_bar_new_(rm, device, type, inst, &bar);
|
||||
*pbar = bar;
|
||||
if (ret) {
|
||||
if (!bar)
|
||||
kfree(rm);
|
||||
kfree(rm);
|
||||
return ret;
|
||||
}
|
||||
*pbar = bar;
|
||||
|
||||
bar->flushBAR2PhysMode = ioremap(device->func->resource_addr(device, 3), PAGE_SIZE);
|
||||
if (!bar->flushBAR2PhysMode)
|
||||
|
Loading…
Reference in New Issue
Block a user