hwrng: cavium - fix NULL but dereferenced coccicheck error
Fix following coccicheck warning: ./drivers/char/hw_random/cavium-rng-vf.c:182:17-20: ERROR: pdev is NULL but dereferenced. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Reviewed-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
959e375464
commit
e6205ad58a
@ -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");
|
||||
pr_err("Cannot find RNG PF device\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user