[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1372390325-7566-2-git-send-email-festevam@gmail.com>
Date: Fri, 28 Jun 2013 00:32:02 -0300
From: Fabio Estevam <festevam@...il.com>
To: gregkh@...uxfoundation.org
Cc: shawn.guo@...aro.org, kernel@...gutronix.de,
linux-kernel@...r.kernel.org,
Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH 2/5] imx-drm: ipu-dp: Check the return value of devm_kzalloc()
From: Fabio Estevam <fabio.estevam@...escale.com>
devm_kzalloc() may fail, so let's check its return value.
Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c b/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
index 113b046..0449515 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
@@ -309,6 +309,8 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
int i;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
priv->dev = dev;
priv->ipu = ipu;
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists