firmware: tegra: bpmp: Fix error paths in debugfs
authorMikko Perttunen <mperttunen@nvidia.com>
Wed, 1 Mar 2023 13:47:55 +0000 (15:47 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 3 Apr 2023 12:29:05 +0000 (14:29 +0200)
commit60b3a99a3b50c94814b84795e38e2161767ea277
treed267ac63b476ca54cdd3f45f72460f6dc260a97e
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6
firmware: tegra: bpmp: Fix error paths in debugfs

Some error paths in mrq_debug_read and bpmp_debug_show would overwrite
the return error code with a subsequent call to mrq_debug_close.

Change the code to only change the error code if there was no prior
error.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/firmware/tegra/bpmp-debugfs.c