mtd: rawnand: qcom: Fix the opcode check in qcom_check_op()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Sat, 5 Aug 2023 17:41:40 +0000 (23:11 +0530)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 18 Aug 2023 14:34:26 +0000 (16:34 +0200)
commitb4bb4800313de0d8faa5615d4943615ff56c1cc2
treec5e538053e1ef959ed69cb4bfef9b6c324ab7d36
parentdd3c8f4ab2035bdba41c840a7daaf1cc735f36bb
mtd: rawnand: qcom: Fix the opcode check in qcom_check_op()

qcom_check_op() function checks for the invalid opcode for the instruction
types. Currently, it just returns -ENOTSUPP for all opcodes of
NAND_OP_CMD_INSTR type due to the use of "||" operator instead of "&&".
Fix it!

This also fixes the following smatch warning:

drivers/mtd/nand/raw/qcom_nandc.c:3036 qcom_check_op() warn: was && intended here instead of ||?

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202308032022.SnXkKyFs-lkp@intel.com/
Fixes: 89550beb098e ("mtd: rawnand: qcom: Implement exec_op()")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-5-manivannan.sadhasivam@linaro.org
drivers/mtd/nand/raw/qcom_nandc.c