mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
spi: stm32-ospi: clean up on error in probe()
If reset_control_acquire() fails, then we can't return directly.
We need to do a little clean up first.
Fixes: cf2c3eceb7 ("spi: stm32-ospi: Make usage of reset_control_acquire/release() API")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aEmAGTUzzKZlLe3K@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
bd30b995df
commit
83f066fac3
|
|
@ -937,8 +937,10 @@ static int stm32_ospi_probe(struct platform_device *pdev)
|
|||
goto err_pm_enable;
|
||||
|
||||
ret = reset_control_acquire(ospi->rstc);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "Can not acquire reset %d\n", ret);
|
||||
if (ret) {
|
||||
dev_err_probe(dev, ret, "Can not acquire reset %d\n", ret);
|
||||
goto err_pm_resume;
|
||||
}
|
||||
|
||||
reset_control_assert(ospi->rstc);
|
||||
udelay(2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user