HSI: hsi_char: Delete an error message for a failed memory allocation in hsc_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 2 Feb 2018 20:21:12 +0000 (21:21 +0100)
committerSebastian Reichel <sre@kernel.org>
Mon, 19 Mar 2018 15:31:07 +0000 (16:31 +0100)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/hsi/clients/hsi_char.c

index cf9c2a3..9d2a6d6 100644 (file)
@@ -697,10 +697,9 @@ static int hsc_probe(struct device *dev)
        int i;
 
        cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL);
-       if (!cl_data) {
-               dev_err(dev, "Could not allocate hsc_client_data\n");
+       if (!cl_data)
                return -ENOMEM;
-       }
+
        hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl));
        if (!hsc_major) {
                ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor,