From: Herbert Xu <herbert@gondor.apana.org.au>
To: Haowen Bai <baihaowen@meizu.com>
Cc: mpm@selenic.com, sgoutham@marvell.com,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwrng: cavium: fix possible NULL pointer dereference
Date: Sat, 19 Mar 2022 13:55:07 +1200 [thread overview]
Message-ID: <YjU3++JNa+XMt/0c@gondor.apana.org.au> (raw)
In-Reply-To: <1647573872-19278-1-git-send-email-baihaowen@meizu.com>
On Fri, Mar 18, 2022 at 11:24:32AM +0800, Haowen Bai wrote:
> pdev is NULL but dereference to pdev->dev
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> drivers/char/hw_random/cavium-rng-vf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/hw_random/cavium-rng-vf.c b/drivers/char/hw_random/cavium-rng-vf.c
> index 6f66919..bffcb01 100644
> --- a/drivers/char/hw_random/cavium-rng-vf.c
> +++ b/drivers/char/hw_random/cavium-rng-vf.c
> @@ -179,7 +179,7 @@ static int cavium_map_pf_regs(struct cavium_rng *rng)
> pdev = pci_get_device(PCI_VENDOR_ID_CAVIUM,
> PCI_DEVID_CAVIUM_RNG_PF, NULL);
> if (!pdev) {
> - dev_err(&pdev->dev, "Cannot find RNG PF device\n");
> + printk(KERN_ERR "Cannot find RNG PF device\n");
Please use pr_err.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2022-03-19 1:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 3:24 Haowen Bai
2022-03-19 1:55 ` Herbert Xu [this message]
2022-03-21 1:28 Haowen Bai
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=YjU3++JNa+XMt/0c@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=baihaowen@meizu.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=sgoutham@marvell.com \
/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
all inboxes | Powered by JetHome®