[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1505892308-6843-2-git-send-email-arvind.yadav.cs@gmail.com>
Date: Wed, 20 Sep 2017 12:55:07 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: thierry.reding@...il.com, airlied@...ux.ie, jonathanh@...dia.com,
daniel.vetter@...el.com, jani.nikula@...ux.intel.com,
seanpaul@...omium.org
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] drm: tegra: dc: Handle return value of kasprintf
kasprintf() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
drivers/gpu/drm/tegra/dc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 4df3911..f3214a1 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1695,6 +1695,8 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
int err;
name = kasprintf(GFP_KERNEL, "dc.%d", dc->pipe);
+ if (!name)
+ return -ENOMEM;
dc->debugfs = debugfs_create_dir(name, minor->debugfs_root);
kfree(name);
--
1.9.1
Powered by blists - more mailing lists