diff mbox series

[net-next] r8169: use dev_err_probe in rtl_get_ether_clk

Message ID b0c4ebcf-2047-e933-b890-8a20e4bdb19f@gmail.com
State New
Headers show
Series [net-next] r8169: use dev_err_probe in rtl_get_ether_clk | expand

Commit Message

Heiner Kallweit Nov. 19, 2020, 9 p.m. UTC
Tiny improvement, let dev_err_probe() deal with EPROBE_DEFER.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski Nov. 21, 2020, 2:37 a.m. UTC | #1
On Thu, 19 Nov 2020 22:00:11 +0100 Heiner Kallweit wrote:
> Tiny improvement, let dev_err_probe() deal with EPROBE_DEFER.

> 

> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>


Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 7dd643f53..a5c7a3935 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5165,8 +5165,8 @@  static int rtl_get_ether_clk(struct rtl8169_private *tp)
 		if (rc == -ENOENT)
 			/* clk-core allows NULL (for suspend / resume) */
 			rc = 0;
-		else if (rc != -EPROBE_DEFER)
-			dev_err(d, "failed to get clk: %d\n", rc);
+		else
+			dev_err_probe(d, rc, "failed to get clk\n");
 	} else {
 		tp->clk = clk;
 		rc = clk_prepare_enable(clk);