A potiential null pointer dereference issue may occur in
gpmi_nfc_exec_op(), found by coverity, CID
9000785.
In the for loop, if loop continues in NAND_OP_CMD_INSTR case, the desc
pointer may leave as null, so move the pointer sanity check outside the
loop.
Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
&direct);
break;
}
+ }
- if (!desc) {
- ret = -ENXIO;
- goto unmap;
- }
+ if (!desc) {
+ ret = -ENXIO;
+ goto unmap;
}
dev_dbg(this->dev, "%s setup done\n", __func__);