diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-07 19:47:48 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-14 17:54:09 +0100 |
commit | d6906e7efa8071f911fd92a35cec57473bca3074 (patch) | |
tree | 5c64e0f4462dacbd85b6d44d24df2e455757ad17 | |
parent | b857cacd748e524d5603ddbbe630bdcfb74bd3f6 (diff) |
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>
-rw-r--r-- | drivers/parport/parport_ax88796.c | 4 |
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) { |