mtd: ssfdc: One function call less in ssfdcr_add_mtd() after error detection
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 27 Dec 2023 12:21:52 +0000 (13:21 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 5 Feb 2024 13:22:39 +0000 (14:22 +0100)
commite8b7d11c7e4b88c4988f2c740e9303f39a8c2ec4
treea9b556babafd2b546d443ab968d563437f03ab37
parent8d55a90b2b401e6b5dd289ebbc04dfd9e72ed35f
mtd: ssfdc: One function call less in ssfdcr_add_mtd() after error detection

The kfree() function was called in one case by
the ssfdcr_add_mtd() function during error handling
even if the passed data structure member contained a null pointer.
This issue was detected by using the Coccinelle software.

Thus use another label.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/56d92e42-db9e-4767-bcb1-9686bdf34a03@web.de
drivers/mtd/ssfdc.c