projects
/
wrapfs-5.8.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbb2d15
)
mtd: rawnand: vf610: disable clk on error handling path in probe
author
Evgeny Novikov
<novikov@ispras.ru>
Thu, 6 Aug 2020 07:26:34 +0000
(10:26 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:59 +0000
(10:07 +0100)
[ Upstream commit
cb7dc3178a9862614b1e7567d77f4679f027a074
]
vf610_nfc_probe() does not invoke clk_disable_unprepare() on one error
handling path. The patch fixes that.
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: 6f0ce4dfc5a3 ("mtd: rawnand: vf610: Avoid a potential NULL pointer dereference")
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20200806072634.23528-1-novikov@ispras.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/vf610_nfc.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/raw/vf610_nfc.c
b/drivers/mtd/nand/raw/vf610_nfc.c
index 7248c590118367ad8cdac6f0cf4078770277bce8..fcca45e2abe203163e139ccc76e1475e2f546bb4 100644
(file)
--- a/
drivers/mtd/nand/raw/vf610_nfc.c
+++ b/
drivers/mtd/nand/raw/vf610_nfc.c
@@
-852,8
+852,10
@@
static int vf610_nfc_probe(struct platform_device *pdev)
}
of_id = of_match_device(vf610_nfc_dt_ids, &pdev->dev);
- if (!of_id)
- return -ENODEV;
+ if (!of_id) {
+ err = -ENODEV;
+ goto err_disable_clk;
+ }
nfc->variant = (enum vf610_nfc_variant)of_id->data;