diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-07 14:47:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-14 12:54:09 -0400 |
commit | d6906e7efa8071f911fd92a35cec57473bca3074 (patch) | |
tree | 5c64e0f4462dacbd85b6d44d24df2e455757ad17 /drivers/parport | |
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>
Diffstat (limited to 'drivers/parport')
-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) | |||
281 | int ret; | 281 | int ret; |
282 | 282 | ||
283 | dd = kzalloc(sizeof(struct ax_drvdata), GFP_KERNEL); | 283 | dd = kzalloc(sizeof(struct ax_drvdata), GFP_KERNEL); |
284 | if (dd == NULL) { | 284 | if (!dd) |
285 | dev_err(_dev, "no memory for private data\n"); | ||
286 | return -ENOMEM; | 285 | return -ENOMEM; |
287 | } | ||
288 | 286 | ||
289 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 287 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
290 | if (res == NULL) { | 288 | if (res == NULL) { |