]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
serial: sc16is7xx: drop -ENOMEM error message
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Mon, 27 Oct 2025 14:29:48 +0000 (10:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Oct 2025 14:25:41 +0000 (15:25 +0100)
Core already prints detailed error messages on ENOMEM errors and drivers
should avoid repeating it.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20251027142957.1032073-7-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c

index 1acf5be03d489ac5240a6079191c1e0ebb7a101a..ce2a0967ffdf41d3b93263627d24c427fcbba095 100644 (file)
@@ -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);