mtd: rawnand: marvell: set reg_clk to NULL if it can't be obtained
authorDaniel Mack <daniel@zonque.org>
Sun, 8 Jul 2018 00:10:08 +0000 (02:10 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 08:10:15 +0000 (10:10 +0200)
commitf9e64d61042575960ce868fa974d9dbe4937c59a
treefa4e0e940ee2d14798844327768240f1d9f248ff
parent7734a275a7eebf11878a923dc102908eff0f0657
mtd: rawnand: marvell: set reg_clk to NULL if it can't be obtained

Don't keep an error-pointer around in the private struct. If this optional
clock can't be obtained, simply set the pointer to NULL instead so we can
use clk_prepare_enable() on it without further checks,

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/marvell_nand.c