Skip to content

Commit b444686

Browse files
silviupopescugregkh
authored andcommitted
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>
1 parent 6b83f91 commit b444686

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎drivers/staging/imx-drm/ipu-v3/ipu-dp.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
316316

317317
priv->base = devm_ioremap(dev, base, PAGE_SIZE);
318318
if (!priv->base) {
319-
kfree(priv);
320319
return -ENOMEM;
321320
}
322321

0 commit comments

Comments
 (0)