Skip to contentSkip to conversation

crypto: cavium - Add the Virtual Function driver for CPT

bug report Dan Carpenter 1 participant 1 message Feb 15, 2017 Crypto API

lore
Share & tools
lore
#0 lore raw

Hello George Cherian,

This is a semi-automatic email about new static checker warnings.

The patch c694b233295b: "crypto: cavium - Add the Virtual Function driver for CPT" from Feb 7, 2017, leads to the following Smatch complaint:

drivers/crypto/cavium/cpt/cptvf_reqmanager.c:333 do_post_process()
warn: variable dereferenced before check 'cptvf' (see line 331)

drivers/crypto/cavium/cpt/cptvf_reqmanager.c
330 {

   331		struct pci_dev *pdev = cptvf->pdev;
                                       ^^^^^^^^^^^

Dereference.

332

   333		if (!info || !cptvf) {
                              ^^^^^

Check is too late.

334 dev_err(&pdev->dev, "Input params are incorrect for post processing\n");
335 return;

regards,
dan carpenter