diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-06-08 14:16:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-28 21:46:05 +0900 |
commit | 63e57b953f747ce39f8de51548b4e584f00273ae (patch) | |
tree | 62eb181701f482d1472f23d9c0d808c8e41a1916 /drivers/staging/mt7621-pinctrl | |
parent | c3de99239efd15d956c0f2b8475f6670f6f69b7b (diff) | |
download | linux-63e57b953f747ce39f8de51548b4e584f00273ae.tar.bz2 |
staging: mt7621-pinctrl: remove unnecessary 'out of memory' message
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>
Diffstat (limited to 'drivers/staging/mt7621-pinctrl')
-rw-r--r-- | drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index 4a32d2b95735..8d5d4f15dc64 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c @@ -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; |