Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: ffb: fix ffb_probe error path

Current implementation calls of_iounmap for par->fbc twice in error path.
In the case of goto out_unmap_dac, we should call of_iounmap for par->dac.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

axel lin and committed by
Paul Mundt
7b0e2785 49bb0943

+1 -1
+1 -1
drivers/video/ffb.c
··· 1010 1010 fb_dealloc_cmap(&info->cmap); 1011 1011 1012 1012 out_unmap_dac: 1013 - of_iounmap(&op->resource[2], par->fbc, sizeof(struct ffb_fbc)); 1013 + of_iounmap(&op->resource[1], par->dac, sizeof(struct ffb_dac)); 1014 1014 1015 1015 out_unmap_fbc: 1016 1016 of_iounmap(&op->resource[2], par->fbc, sizeof(struct ffb_fbc));