Commit 5794465b authored by Phil Edworthy's avatar Phil Edworthy Committed by Miquel Raynal
Browse files

mtd: rawnand: mpc5121: Check before clk_disable_unprepare() not needed



All code in clk_disable_unprepare() already checks the clk ptr using
IS_ERR_OR_NULL so there is no need to check it again before calling it.
A lot of other drivers already rely on this behaviour, so it's safe
to do so here.

Signed-off-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220512185033.46901-1-phil.edworthy@renesas.com
parent 6879854d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -595,7 +595,6 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd)
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct mpc5121_nfc_prv *prv = nand_get_controller_data(chip);

	if (prv->clk)
	clk_disable_unprepare(prv->clk);

	if (prv->csreg)