]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: mt7621-pinctrl: remove unnecessary 'out of memory' message
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 8 Jun 2018 12:16:33 +0000 (14:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 12:46:05 +0000 (21:46 +0900)
Messages when memory allocation fails are not needed at all
and checkpatch script complains about them. Remove one in this
driver code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c

index 4a32d2b95735e73959de48116251432505fac6c9..8d5d4f15dc64446d9f6f12e91d08a3059222f85c 100644 (file)
@@ -379,10 +379,8 @@ static int rt2880_pinmux_pins(struct rt2880_priv *p)
                /* strlen("ioXY") + 1 = 5 */
                char *name = devm_kzalloc(p->dev, 5, GFP_KERNEL);
 
-               if (!name) {
-                       dev_err(p->dev, "Failed to allocate pad name\n");
+               if (!name)
                        return -ENOMEM;
-               }
                snprintf(name, 5, "io%d", i);
                p->pads[i].number = i;
                p->pads[i].name = name;