[PATCH] video: imxfb: Fix call of memalign()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Mon Jun 27 02:58:55 PDT 2022


The first argument is the alignment not the allocation size ...

Fixes: 36152c5aa546 ("video: imx: assert that image buffer doesn't cross a 4 MiB boundary")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 drivers/video/imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/imx.c b/drivers/video/imx.c
index d15c2d88fb91..633815f5d919 100644
--- a/drivers/video/imx.c
+++ b/drivers/video/imx.c
@@ -404,7 +404,7 @@ static int imxfb_allocate_fbbuffer(const struct device_d *dev,
 		 * allocation as necessary, but in the absense of a better
 		 * function just use it.
 		 */
-		info->screen_base = memalign(fbsize, SZ_4M);
+		info->screen_base = memalign(SZ_4M, fbsize);
 		if (!info->screen_base)
 			return -ENOMEM;
 		memset(info->screen_base, 0, fbsize);

base-commit: ff087598f4cdc426ba883a8720367a4ff3d6b9fe
-- 
2.36.1




More information about the barebox mailing list