Skip to content

Commit

Permalink
spi: atmel: Put allocated master before return
Browse files Browse the repository at this point in the history
The allocated master is not released. Goto error handling label rather
than directly return.

Fixes: 5e9af37 ("spi: atmel: introduce probe deferring")
Signed-off-by: Pan Bian <[email protected]>
Fixes: 5e9af37 ("spi: atmel: introduce probe deferring")
Reviewed-by: Tudor Ambarus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
SinkFinder authored and broonie committed Jan 21, 2021
1 parent 258ea99 commit 21ea274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
if (ret == 0) {
as->use_dma = true;
} else if (ret == -EPROBE_DEFER) {
return ret;
goto out_unmap_regs;
}
} else if (as->caps.has_pdc_support) {
as->use_pdc = true;
Expand Down

0 comments on commit 21ea274

Please sign in to comment.