Skip to content

Commit

Permalink
spi: microchip-core: Simplify some error message
Browse files Browse the repository at this point in the history
dev_err_probe() already prints the error code in a human readable way, so
there is no need to duplicate it as a numerical value at the end of the
message.

Moreover, in the case of devm_clk_get() it would only display '0' because
'ret' is know to be 0 at this point.

Fixes: cdeaf3a ("spi: microchip-core: switch to use dev_err_probe()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/fb894ecec68e03fb7fc9353027c8b1a2610833d7.1659735153.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Christophe JAILLET authored and Mark Brown committed Aug 15, 2022
1 parent dad57a5 commit 7964e81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-microchip-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,12 @@ static int mchp_corespi_probe(struct platform_device *pdev)
IRQF_SHARED, dev_name(&pdev->dev), master);
if (ret)
return dev_err_probe(&pdev->dev, ret,
"could not request irq: %d\n", ret);
"could not request irq\n");

spi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(spi->clk))
return dev_err_probe(&pdev->dev, PTR_ERR(spi->clk),
"could not get clk: %d\n", ret);
"could not get clk\n");

ret = clk_prepare_enable(spi->clk);
if (ret)
Expand Down

0 comments on commit 7964e81

Please sign in to comment.