[PATCH] powerpc/pseries: Fix exception handling in pSeries_reconfig_add_node()
Nathan Lynch
nathanl at linux.ibm.com
Sat Mar 18 00:11:35 AEDT 2023
Markus Elfring <Markus.Elfring at web.de> writes:
>
> The label “out_err” was used to jump to another pointer check despite of
> the detail in the implementation of the function “pSeries_reconfig_add_node”
> that it was determined already that the corresponding variable contained
> a null pointer (because of a failed function call in two cases).
>
> 1. Thus return directly after a call of the function “kzalloc” failed.
>
> 2. Use more appropriate labels instead.
>
> 3. Delete a redundant check.
>
> 4. Omit an explicit initialisation for the local variable “err”.
>
> This issue was detected by using the Coccinelle software.
Is there a correctness or safety issue here? The subject uses the word
"fix" but the commit message doesn't seem to identify one.
Can you share how Coccinelle is being invoked and its output?
More information about the Linuxppc-dev
mailing list