spi: mt7621: Fix an error message in mt7621_spi_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 27 Aug 2022 11:42:07 +0000 (13:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:40 +0000 (12:34 +0200)
commite962e458bf96df2583b974a3ab272dd8a4bdb983
treeeada3d8cd5e5e6f0b1fb1d6706f2438212e82156
parent0a16bbc8b030ffe820b244f0702fe43f8293e1fa
spi: mt7621: Fix an error message in mt7621_spi_probe()

[ Upstream commit 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 ]

'status' is known to be 0 at this point. The expected error code is
PTR_ERR(clk).

Switch to dev_err_probe() in order to display the expected error code (in a
human readable way).
This also filters -EPROBE_DEFER cases, should it happen.

Fixes: 1ab7f2a43558 ("staging: mt7621-spi: add mt7621 support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/928f3fb507d53ba0774df27cea0bbba4b055993b.1661599671.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-mt7621.c