mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] video: imxfb: Fix call of memalign()
Date: Mon, 27 Jun 2022 11:58:55 +0200	[thread overview]
Message-ID: <20220627095855.32842-1-u.kleine-koenig@pengutronix.de> (raw)

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@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




             reply	other threads:[~2022-06-27 10:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27  9:58 Uwe Kleine-König [this message]
2022-06-29  7:11 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220627095855.32842-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox