mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 3/5] crypto: caam - pbl-init: fix null pointer check
Date: Tue,  7 Mar 2023 11:14:44 +0100	[thread overview]
Message-ID: <20230307101446.2077676-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230307101446.2077676-1-a.fatoum@pengutronix.de>

struct jr_data_st::desc is an array, so g_jrdata->desc will never be
NULL. Fix the check to instead compare g_jrdata against NULL.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/crypto/caam/pbl-init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/pbl-init.c b/drivers/crypto/caam/pbl-init.c
index 3bc6cfaaeea1..08fad4525a21 100644
--- a/drivers/crypto/caam/pbl-init.c
+++ b/drivers/crypto/caam/pbl-init.c
@@ -331,7 +331,7 @@ static int do_instantiation(struct caam_job_ring __iomem *jr,
 	u32 ent_delay;
 	u32 status;
 
-	if (!g_jrdata->desc) {
+	if (!g_jrdata) {
 		pr_err("descriptor allocation failed\n");
 		return -ENODEV;
 	}
-- 
2.30.2




  parent reply	other threads:[~2023-03-07 10:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 10:14 [PATCH master 1/5] net: dsa: realtek: rtl8365mb: add missing new line to log print Ahmad Fatoum
2023-03-07 10:14 ` [PATCH master 2/5] net: dsa: realtek: mdio: fix out-of-bounds memory write Ahmad Fatoum
2023-03-07 10:14 ` Ahmad Fatoum [this message]
2023-03-07 10:14 ` [PATCH master 4/5] ARM: i.MX8M: silence warning accessing bootrom log in zero page Ahmad Fatoum
2023-03-07 10:14 ` [PATCH master 5/5] ARM: i.MX8M: fix outdated comment about imx-atf Ahmad Fatoum
2023-03-09 10:50 ` [PATCH master 1/5] net: dsa: realtek: rtl8365mb: add missing new line to log print 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=20230307101446.2077676-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@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