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@xxxxxxxxx> --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index 8abddb6..f0054f1 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c @@ -371,10 +371,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; -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel