[PATCH RESEND] mtd: cfi_cmdset_0001: Fix exception handling in cfi_intelext_setup()

Dan Carpenter dan.carpenter at linaro.org
Tue Mar 18 05:03:36 PDT 2025


On Tue, Mar 04, 2025 at 08:21:53PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring at users.sourceforge.net>
> Date: Tue, 21 Mar 2023 20:13:51 +0100
> 
> The label “setup_err” was used to jump to another pointer check despite of
> the detail in the implementation of the function “cfi_intelext_setup”
> that it was determined already that a corresponding variable contained
> a null pointer because of a failed memory allocation.
> 
> * Thus use more appropriate labels instead.
> 
> * Delete a redundant check.
> 
> 
> This issue was detected by using the Coccinelle software.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>

Don't use a Fixes tag for cleanups.

regards,
dan carpenter




More information about the linux-mtd mailing list