[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bfd6d815-3c09-9faf-e85f-fe837c38bd4a@users.sourceforge.net>
Date: Thu, 8 Feb 2018 15:37:28 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
Patrik Jakobsson <patrik.r.jakobsson@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/3] drm/gma500: Delete an error message for a failed memory
allocation in two functions
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 8 Feb 2018 14:55:49 +0100
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/gpu/drm/gma500/framebuffer.c | 4 +---
drivers/gpu/drm/gma500/oaktrail_hdmi.c | 5 +----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index cb0a2ae916e0..3ff320f3ff47 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -530,10 +530,8 @@ int psb_fbdev_init(struct drm_device *dev)
int ret;
fbdev = kzalloc(sizeof(struct psb_fbdev), GFP_KERNEL);
- if (!fbdev) {
- dev_err(dev->dev, "no memory\n");
+ if (!fbdev)
return -ENOMEM;
- }
dev_priv->fbdev = fbdev;
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index 8b2eb32ee988..d9a6d54b6641 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -690,11 +690,8 @@ void oaktrail_hdmi_setup(struct drm_device *dev)
return;
hdmi_dev = kzalloc(sizeof(struct oaktrail_hdmi_dev), GFP_KERNEL);
- if (!hdmi_dev) {
- dev_err(dev->dev, "failed to allocate memory\n");
+ if (!hdmi_dev)
goto out;
- }
-
ret = pci_enable_device(pdev);
if (ret) {
--
2.16.1
Powered by blists - more mailing lists