Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: typec: mux: Remove the use of dev_err_probe()

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>

authored by

Xichao Zhao and committed by
Greg Kroah-Hartman
d15fbd3e 1f43a340

+1 -1
+1 -1
drivers/usb/typec/mux/tusb1046.c
··· 129 129 130 130 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 131 131 if (!priv) 132 - return dev_err_probe(dev, -ENOMEM, "failed to allocate driver data\n"); 132 + return -ENOMEM; 133 133 134 134 priv->client = client; 135 135