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 |
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 --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);
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(-)