coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 5 Jun 2017 20:15:07 +0000 (14:15 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:45:24 +0000 (11:45 +0200)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etb10.c

index 979ea6ec7902b26f4382f8c0b56530c69226233f..837aebf22c456e83cddb28b6f1b521ab54858f80 100644 (file)
@@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
 
        drvdata->buf = devm_kzalloc(dev,
                                    drvdata->buffer_depth * 4, GFP_KERNEL);
-       if (!drvdata->buf) {
-               dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
-                       drvdata->buffer_depth * 4);
+       if (!drvdata->buf)
                return -ENOMEM;
-       }
 
        desc.type = CORESIGHT_DEV_TYPE_SINK;
        desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;