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>
/* 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;