drm/nouveau/pmu: don't print reply values if exec is false
authorColin Ian King <colin.king@canonical.com>
Wed, 19 Dec 2018 15:29:49 +0000 (15:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 09:24:17 +0000 (10:24 +0100)
commit2b34aa0288e5f1a58baa0e031c8ae8b5aa8dadba
treee0f16f5b693151a2e3f7c8c2c577b0ff9b29d20c
parent3e5c8e8a2debb8cdb152bf526a181f66f085ae92
drm/nouveau/pmu: don't print reply values if exec is false

[ Upstream commit b1d03fc36ec9834465a08c275c8d563e07f6f6bf ]

Currently the uninitialized values in the array reply are printed out
when exec is false and nvkm_pmu_send has not updated the array. Avoid
confusion by only dumping out these values if they have been actually
updated.

Detected by CoverityScan, CID#1271291 ("Uninitialized scaler variable")
Fixes: ebb58dc2ef8c ("drm/nouveau/pmu: rename from pwr (no binary change)")

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>
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c