mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 00:59:39 +07:00
mtd: rawnand: vf610: disable clk on error handling path in probe
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: 6f0ce4dfc5
("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
This commit is contained in:
parent
d43511d05c
commit
cb7dc3178a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user