On Fri, May 28, 2021 at 01:39:14AM +0200, Fabio M. De Francesco wrote: > Coccinelle detected that fw is NULL but dereferenced. > > static int gb_bootrom_get_firmware(struct gb_operation *op) > { > /* lines of code */ > if (!fw) { > dev_err(dev, "%s: firmware not available\n", __func__); > ret = -EINVAL; > goto unlock; > } > /* lines of code */ > unlock: > unlock: > mutex_unlock(&bootrom->mutex); > > queue_work: > /* Refresh timeout */ > if (!ret && (offset + size == fw->size)) <--- here ^^^ False positive. The "!ret" check already ensures that "fw" is non-NULL. regards, dan carpenter