]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: typec: mux: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 19 Aug 2025 11:24:51 +0000 (19:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Aug 2025 06:09:09 +0000 (08:09 +0200)
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: Romain Gantois <romain.gantois@bootlin.com>
Link: https://lore.kernel.org/r/20250819112451.587817-1-zhao.xichao@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/tusb1046.c

index b4f45c217b59fe033551e8e6379ad2d33ebedbcb..3c1a4551c2fbfea6de2b11de508c2dd812b2a3fb 100644 (file)
@@ -129,7 +129,7 @@ static int tusb1046_i2c_probe(struct i2c_client *client)
 
        priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
        if (!priv)
-               return dev_err_probe(dev, -ENOMEM, "failed to allocate driver data\n");
+               return -ENOMEM;
 
        priv->client = client;