summaryrefslogtreecommitdiffstats
path: root/drivers/parport
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-02-07 19:47:48 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-14 17:54:09 +0100
commitd6906e7efa8071f911fd92a35cec57473bca3074 (patch)
tree5c64e0f4462dacbd85b6d44d24df2e455757ad17 /drivers/parport
parentb857cacd748e524d5603ddbbe630bdcfb74bd3f6 (diff)
downloadblackbird-op-linux-d6906e7efa8071f911fd92a35cec57473bca3074.tar.gz
blackbird-op-linux-d6906e7efa8071f911fd92a35cec57473bca3074.zip
parport: ax88796: Delete an error message for a failed memory allocation in parport_ax88796_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: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/parport_ax88796.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c
index 2fc91edb058d..ef0aec4b55f3 100644
--- a/drivers/parport/parport_ax88796.c
+++ b/drivers/parport/parport_ax88796.c
@@ -281,10 +281,8 @@ static int parport_ax88796_probe(struct platform_device *pdev)
int ret;
dd = kzalloc(sizeof(struct ax_drvdata), GFP_KERNEL);
- if (dd == NULL) {
- dev_err(_dev, "no memory for private data\n");
+ if (!dd)
return -ENOMEM;
- }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) {
OpenPOWER on IntegriCloud