drm/amdgpu: fix NULL pointer dereference for Renoir
authorDirk Gouders <dirk@gouders.net>
Thu, 1 Oct 2020 19:55:25 +0000 (21:55 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Oct 2020 19:12:46 +0000 (15:12 -0400)
commit2ae78708047026397713a0e4af011bdd5d392e14
tree2f34359a5de51c643e0bb20fd0a9db5b8293626c
parent234676d6dbbcd8b2a495e76efdc69e24c0aa300f
drm/amdgpu: fix NULL pointer dereference for Renoir

Commit c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir")
introduced a NULL pointer dereference when booting with
amdgpu.discovery=0, because it removed the call of vega10_reg_base_init()
for that case.

Fix this by calling that funcion if amdgpu_discovery == 0 in addition to
the case that amdgpu_discovery_reg_base_init() failed.

Fixes: c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir")
Signed-off-by: Dirk Gouders <dirk@gouders.net>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/soc15.c