From: kernel test robot <lkp(a)intel.com>
drivers/gpu/drm/bridge/ite-it66121.c:944:5-11: inconsistent IS_ERR and PTR_ERR on line
946.
PTR_ERR should access the value just tested by IS_ERR
Semantic patch information:
There can be false positives in the patch case, where it is the call to
IS_ERR that is wrong.
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Phong LE <ple(a)baylibre.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url:
https://github.com/0day-ci/linux/commits/Neil-Armstrong/drm-bridge-Add-it...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
bf05bf16c76bb44ab5156223e1e58e26dfe30a88
ite-it66121.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -943,7 +943,7 @@ static int it66121_probe(struct i2c_clie
ctx->regmap = devm_regmap_init_i2c(client, &it66121_regmap_config);
if (IS_ERR(ctx->regmap)) {
ite66121_power_off(ctx);
- return PTR_ERR(ctx);
+ return PTR_ERR(ctx->regmap);
}
regmap_read(ctx->regmap, IT66121_VENDOR_ID0_REG, &vendor_ids[0]);