lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1341dc6b-49da-44f9-8b57-6828a64114fe@web.de>
Date: Tue, 23 Sep 2025 19:05:19 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Johan Hovold <johan@...nel.org>, linux-mtd@...ts.infradead.org
Cc: LKML <linux-kernel@...r.kernel.org>,
 Miquel Raynal <miquel.raynal@...tlin.com>,
 Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>
Subject: Re: [PATCH] mtd: rawnand: omap2: fix device leak on probe failure

…
> +++ b/drivers/mtd/nand/raw/omap2.c
…
> @@ -2054,7 +2054,8 @@ static int omap_nand_attach_chip(struct nand_chip *chip)
>  		break;
>  	default:
>  		dev_err(dev, "Invalid or unsupported ECC scheme\n");
> -		return -EINVAL;
> +		err = -EINVAL;
> +		goto err_put_elm_dev;
>  	}
>  
>  	if (elm_bch_strength >= 0) {
…
> @@ -2083,10 +2084,24 @@ static int omap_nand_attach_chip(struct nand_chip *chip)
>  		dev_err(dev,
>  			"Not enough OOB bytes: required = %d, available=%d\n",
>  			min_oobbytes, mtd->oobsize);
> -		return -EINVAL;
> +		err = -EINVAL;
> +		goto err_put_elm_dev;
>  	}
…

May such an error code assignment be moved behind an additional label?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ