summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-03-09 09:56:31 +0100
committerLee Jones <lee.jones@linaro.org>2018-05-16 09:21:48 +0100
commit59f4d741b15d45e68cdca63232ee8cd4224f2ccc (patch)
tree96a95bbec7ed3252f460f76ab4cab28a9cadf615
parent9363be216aa65ef1713e3c06a49bcbeb747e1c19 (diff)
downloadtalos-obmc-linux-59f4d741b15d45e68cdca63232ee8cd4224f2ccc.tar.gz
talos-obmc-linux-59f4d741b15d45e68cdca63232ee8cd4224f2ccc.zip
mfd: viperboard: Delete an error message for a failed memory allocation in vprbrd_probe()
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: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/viperboard.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c
index e6b3c70aeb22..e9f61262d583 100644
--- a/drivers/mfd/viperboard.c
+++ b/drivers/mfd/viperboard.c
@@ -59,10 +59,8 @@ static int vprbrd_probe(struct usb_interface *interface,
/* allocate memory for our device state and initialize it */
vb = kzalloc(sizeof(*vb), GFP_KERNEL);
- if (vb == NULL) {
- dev_err(&interface->dev, "Out of memory\n");
+ if (!vb)
return -ENOMEM;
- }
mutex_init(&vb->lock);
OpenPOWER on IntegriCloud