From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Yang Yingliang <yangyingliang@huawei.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 16/23] can: flexcan: Switch to use dev_err_probe() helper
Date: Thu, 15 Sep 2022 10:20:06 +0200 [thread overview]
Message-ID: <20220915082013.369072-17-mkl@pengutronix.de> (raw)
In-Reply-To: <20220915082013.369072-1-mkl@pengutronix.de>
From: Yang Yingliang <yangyingliang@huawei.com>
dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/all/20220914134030.3782754-1-yangyingliang@huawei.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/flexcan/flexcan-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
index bbe5b0c997f8..5e27944b8a21 100644
--- a/drivers/net/can/flexcan/flexcan-core.c
+++ b/drivers/net/can/flexcan/flexcan-core.c
@@ -2177,8 +2177,7 @@ static int flexcan_probe(struct platform_device *pdev)
err = flexcan_setup_stop_mode(pdev);
if (err < 0) {
- if (err != -EPROBE_DEFER)
- dev_err(&pdev->dev, "setup stop mode failed\n");
+ dev_err_probe(&pdev->dev, err, "setup stop mode failed\n");
goto failed_setup_stop_mode;
}
--
2.35.1
next prev parent reply other threads:[~2022-09-15 8:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 8:19 [PATCH net-next 0/23] pull-request: can-next 2022-09-15 Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 01/23] can: rx-offload: can_rx_offload_init_queue(): fix typo Marc Kleine-Budde
2022-09-17 19:20 ` patchwork-bot+netdevbpf
2022-09-15 8:19 ` [PATCH net-next 02/23] can: flexcan: fix typo: FLEXCAN_QUIRK_SUPPPORT_* -> FLEXCAN_QUIRK_SUPPORT_* Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 03/23] can: rcar_canfd: Use dev_err_probe() to simplify code and better handle -EPROBE_DEFER Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 04/23] can: kvaser_usb: kvaser_usb_hydra: Use kzalloc for allocating only one element Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 05/23] dt-bindings: can: nxp,sja1000: Document RZ/N1 power-domains support Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 06/23] can: sja1000: Add support for RZ/N1 SJA1000 CAN Controller Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 07/23] can: sja1000: remove redundant variable ret Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 08/23] can: kvaser_pciefd: " Marc Kleine-Budde
2022-09-15 8:19 ` [PATCH net-next 09/23] can: gs_usb: use common spelling of GS_USB in macros Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 10/23] can: gs_usb: add RX and TX hardware timestamp support Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 11/23] can: etas_es58x: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 12/23] dt-bindings: net: can: nxp,sja1000: drop ref from reg-io-width Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 13/23] docs: networking: device drivers: flexcan: fix invalid email Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 14/23] can: raw: process optimization in raw_init() Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 15/23] can: raw: use guard clause to optimize nesting in raw_rcv() Marc Kleine-Budde
2022-09-15 8:20 ` Marc Kleine-Budde [this message]
2022-09-15 8:20 ` [PATCH net-next 17/23] can: skb: unify skb CAN frame identification helpers Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 18/23] can: skb: add skb CAN frame data length helpers Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 19/23] can: set CANFD_FDF flag in all CAN FD frame structures Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 20/23] can: canxl: introduce CAN XL data structure Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 21/23] can: canxl: update CAN infrastructure for CAN XL frames Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 22/23] can: dev: add CAN XL support to virtual CAN Marc Kleine-Budde
2022-09-15 8:20 ` [PATCH net-next 23/23] can: raw: add CAN XL support Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220915082013.369072-17-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).