diff mbox series

[net-next,2/2] net: dsa: hellcreek: Don't print error message on defer

Message ID 20201121114455.22422-3-kurt@linutronix.de
State New
Headers show
Series net: dsa: hellcreek: Minor cleanups | expand

Commit Message

Kurt Kanzenbach Nov. 21, 2020, 11:44 a.m. UTC
When DSA is not loaded when the driver is probed an error message is
printed. But, that's not really an error, just a defer. Use dev_err_probe()
instead.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
 drivers/net/dsa/hirschmann/hellcreek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Florian Fainelli Nov. 21, 2020, 3:01 p.m. UTC | #1
On 11/21/2020 3:44 AM, Kurt Kanzenbach wrote:
> When DSA is not loaded when the driver is probed an error message is
> printed. But, that's not really an error, just a defer. Use dev_err_probe()
> instead.
> 
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Vladimir Oltean Nov. 22, 2020, 11:10 p.m. UTC | #2
On Sat, Nov 21, 2020 at 12:44:55PM +0100, Kurt Kanzenbach wrote:
> When DSA is not loaded when the driver is probed an error message is
> printed. But, that's not really an error, just a defer. Use dev_err_probe()
> instead.
> 
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
diff mbox series

Patch

diff --git a/drivers/net/dsa/hirschmann/hellcreek.c b/drivers/net/dsa/hirschmann/hellcreek.c
index d42f40c76ba5..6420b76ea37c 100644
--- a/drivers/net/dsa/hirschmann/hellcreek.c
+++ b/drivers/net/dsa/hirschmann/hellcreek.c
@@ -1266,7 +1266,7 @@  static int hellcreek_probe(struct platform_device *pdev)
 
 	ret = dsa_register_switch(hellcreek->ds);
 	if (ret) {
-		dev_err(dev, "Unable to register switch\n");
+		dev_err_probe(dev, ret, "Unable to register switch\n");
 		return ret;
 	}