drm/amd/pp: silence a static checker warning
This has a static checker warning because "frev" and "crev" can be uninitialized if "info" is NULL. I just changed the order of the checks so that we check "info" first. Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
687c1c2eed
commit
326a59e78a
|
@ -319,13 +319,13 @@ static int smu8_get_system_info_data(struct pp_hwmgr *hwmgr)
|
||||||
GetIndexIntoMasterTable(DATA, IntegratedSystemInfo),
|
GetIndexIntoMasterTable(DATA, IntegratedSystemInfo),
|
||||||
&size, &frev, &crev);
|
&size, &frev, &crev);
|
||||||
|
|
||||||
if (crev != 9) {
|
if (info == NULL) {
|
||||||
pr_err("Unsupported IGP table: %d %d\n", frev, crev);
|
pr_err("Could not retrieve the Integrated System Info Table!\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info == NULL) {
|
if (crev != 9) {
|
||||||
pr_err("Could not retrieve the Integrated System Info Table!\n");
|
pr_err("Unsupported IGP table: %d %d\n", frev, crev);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue