diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-06-28 16:55:28 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 20:33:14 (GMT) |
commit | 55b31cf40654b32a75e7c010f9345f361ccae927 (patch) | |
tree | 2115da5c1fba446bfec5f85bc2be627d44788e00 | |
parent | ea8d15832016b0d07a8121159904e6b1d21b5b8b (diff) | |
download | linux-55b31cf40654b32a75e7c010f9345f361ccae927.tar.xz |
imx-drm: ipu-dp: Check the return value of devm_kzalloc()
devm_kzalloc() may fail, so let's check its return value.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |