From: Hugo Villeneuve Date: Mon, 27 Oct 2025 14:29:48 +0000 (-0400) Subject: serial: sc16is7xx: drop -ENOMEM error message X-Git-Tag: v6.19-rc1~64^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0925b4a0417d32189484b19606962c15019645a;p=thirdparty%2Fkernel%2Flinux.git serial: sc16is7xx: drop -ENOMEM error message Core already prints detailed error messages on ENOMEM errors and drivers should avoid repeating it. Signed-off-by: Hugo Villeneuve Link: https://patch.msgid.link/20251027142957.1032073-7-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 1acf5be03d489..ce2a0967ffdf4 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1527,10 +1527,8 @@ int sc16is7xx_probe(struct device *dev, const struct sc16is7xx_devtype *devtype, /* Alloc port structure */ s = devm_kzalloc(dev, struct_size(s, p, devtype->nr_uart), GFP_KERNEL); - if (!s) { - dev_err(dev, "Error allocating port structure\n"); + if (!s) return -ENOMEM; - } /* Always ask for fixed clock rate from a property. */ device_property_read_u32(dev, "clock-frequency", &uartclk);