Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 326a59e7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher
Browse files

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: default avatarRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 687c1c2e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -319,13 +319,13 @@ static int smu8_get_system_info_data(struct pp_hwmgr *hwmgr)
			GetIndexIntoMasterTable(DATA, IntegratedSystemInfo),
			&size, &frev, &crev);

	if (crev != 9) {
		pr_err("Unsupported IGP table: %d %d\n", frev, crev);
	if (info == NULL) {
		pr_err("Could not retrieve the Integrated System Info Table!\n");
		return -EINVAL;
	}

	if (info == NULL) {
		pr_err("Could not retrieve the Integrated System Info Table!\n");
	if (crev != 9) {
		pr_err("Unsupported IGP table: %d %d\n", frev, crev);
		return -EINVAL;
	}