diff options
| author | Ritesh Harjani (IBM) <ritesh.list@gmail.com> | 2026-05-01 07:11:43 +0300 |
|---|---|---|
| committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2026-05-06 05:00:24 +0300 |
| commit | 713e468cdbc2277db6ce949c32c1acbd83501733 (patch) | |
| tree | cc9d49431d5928e488cda5ad5f3993741e4a77f6 /include/linux/moduleloader.h | |
| parent | 1b9f7aafa44f5ce852c00509104d10fd9eb0f402 (diff) | |
| download | linux-713e468cdbc2277db6ce949c32c1acbd83501733.tar.xz | |
pseries/papr-hvpipe: Fix & simplify error handling in papr_hvpipe_init()
Remove such 3 levels of nesting patterns to check success return values
from function calls.
ret = enable_hvpipe_IRQ()
if (!ret)
ret = set_hvpipe_sys_param(1)
if (!ret)
ret = misc_register()
Instead just bail out to "out*:" labels, in case of any error. This
simplifies the init flow.
While at it let's also fix the following error handling logic:
We have already enabled interrupt sources and enabled hvpipe to received
interrupts, if misc_register() fails, we will destroy the workqueue, but
the HMC might send us a msg via hvpipe which will call, queue work on
the workqueue which might be destroyed.
So instead, let's reverse the order of enabling set_hvpipe_sys_param(1)
and in case of an error let's remove the misc dev by calling
misc_deregister().
Cc: stable@vger.kernel.org
Fixes: 39a08a4f94980 ("powerpc/pseries: Enable hvpipe with ibm,set-system-parameter RTAS")
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/f2141eafb80e7780395e03aa9a22e8a37be80513.1777606826.git.ritesh.list@gmail.com
Diffstat (limited to 'include/linux/moduleloader.h')
0 files changed, 0 insertions, 0 deletions
