mtd: parsers: qcom: Fix error condition
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 3 Mar 2021 08:46:34 +0000 (09:46 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 11 Mar 2021 10:57:13 +0000 (11:57 +0100)
commitc95310e1b33eae9767af9698aa976d5301f37203
treea76c56c76103aef5c636feaab643ec55f18830d8
parent2d751203aacf86a1b301a188d8551c7da91043ab
mtd: parsers: qcom: Fix error condition

qcom_smem_get() does not return NULL, and even if it did, the NULL
condition is usually not an error but a success condition and should
not trigger an error trace.

Let's replace IS_ERR_OR_NULL() by IS_ERR().

This fixes the following smatch warning:
drivers/mtd/parsers/qcomsmempart.c:109 parse_qcomsmem_part() warn: passing zero to 'PTR_ERR'

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 803eb124e1a6 ("mtd: parsers: Add Qcom SMEM parser")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210303084634.12796-1-miquel.raynal@bootlin.com
drivers/mtd/parsers/qcomsmempart.c