powerpc/pseries/eeh: Fix use of uninitialised variable
authorOliver O'Halloran <oohall@gmail.com>
Wed, 7 Oct 2020 04:09:03 +0000 (15:09 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 7 Oct 2020 11:34:47 +0000 (22:34 +1100)
commit8175bd580e629dcf9cc507794da774a6b8d3a9bd
treefea43b1ad0057a92701e164f8b14ada0f00a4ef9
parent269e583357df32d77368903214f10f43fa5d7a5f
powerpc/pseries/eeh: Fix use of uninitialised variable

If the RTAS call to query the PE address for a device fails we jump the
err: label where an error message is printed along with the return code.
However, the printed return code is from the "ret" variable which isn't set
at that point since we assigned the result to "addr" instead. Fix this by
consistently using the "ret" variable for the result of the RTAS call
helpers an dropping the "addr" local variable"

Fixes: 98ba956f6a38 ("powerpc/pseries/eeh: Rework device EEH PE determination")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201007040903.819081-2-oohall@gmail.com
arch/powerpc/platforms/pseries/eeh_pseries.c