]> www.infradead.org Git - users/willy/linux.git/commitdiff
net: dsa: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Wed, 20 Aug 2025 08:57:49 +0000 (16:57 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Aug 2025 22:51:42 +0000 (15:51 -0700)
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250820085749.397586-3-zhao.xichao@vivo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/lantiq_gswip.c

index 6eb3140d40444900ca9064620158a6a86dbb5328..ba080b71944c97ca5fb1e1f8ce05c92fb2c6f92d 100644 (file)
@@ -1935,8 +1935,7 @@ static int gswip_gphy_fw_load(struct gswip_priv *priv, struct gswip_gphy_fw *gph
                memcpy(fw_addr, fw->data, fw->size);
        } else {
                release_firmware(fw);
-               return dev_err_probe(dev, -ENOMEM,
-                                    "failed to alloc firmware memory\n");
+               return -ENOMEM;
        }
 
        release_firmware(fw);