summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2021-10-19 15:48:41 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-10-27 10:31:33 +0300
commit1aa3367ca78ce6c1b06726587da1a6d8aa387797 (patch)
tree6d489cecc15596112124c16dd4a18f2f80342895 /drivers
parentde904d80aaec5e01cf069c3418ee087829b4f119 (diff)
downloadlinux-1aa3367ca78ce6c1b06726587da1a6d8aa387797.tar.xz
wlcore: spi: Use dev_err_probe()
Use the existing dev_err_probe() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/465e76901b801ac0755088998249928fd546c08a.1634647460.git.geert+renesas@glider.be
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wlcore/spi.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index f26fc150ecd0..354a7e1c3315 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -488,12 +488,9 @@ static int wl1271_probe(struct spi_device *spi)
spi->bits_per_word = 32;
glue->reg = devm_regulator_get(&spi->dev, "vwlan");
- if (PTR_ERR(glue->reg) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
- if (IS_ERR(glue->reg)) {
- dev_err(glue->dev, "can't get regulator\n");
- return PTR_ERR(glue->reg);
- }
+ if (IS_ERR(glue->reg))
+ return dev_err_probe(glue->dev, PTR_ERR(glue->reg),
+ "can't get regulator\n");
ret = wlcore_probe_of(spi, glue, pdev_data);
if (ret) {