Browse Source

imx_drm: ipu_v3: fix invalid free of devm_* allocated data

The objects allocated by devm_* APIs are managed by devres and are freed
when the device is detached. There is no need to use kfree() explicitly.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Silviu-Mihai Popescu 12 years ago
parent
commit
b4446865bc
1 changed files with 0 additions and 1 deletions
  1. 0 1
      drivers/staging/imx-drm/ipu-v3/ipu-dp.c

+ 0 - 1
drivers/staging/imx-drm/ipu-v3/ipu-dp.c

@@ -316,7 +316,6 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
 
 	priv->base = devm_ioremap(dev, base, PAGE_SIZE);
 	if (!priv->base) {
-		kfree(priv);
 		return -ENOMEM;
 	}