pinctrl: cy8c95x0: Fix return value in cy8c95x0_detect()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 2 Sep 2022 18:26:37 +0000 (21:26 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 8 Sep 2022 08:05:30 +0000 (10:05 +0200)
It's an obvious typo in never tested piece of code that
successful detection shouldn't fail. Fix that.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220902182650.83098-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-cy8c95x0.c

index 529664894e208998ec429716caad3d221e0b1647..2e46446c05ff84a461d16fbb63226a6e5c9f639f 100644 (file)
@@ -1266,7 +1266,7 @@ static int cy8c95x0_detect(struct i2c_client *client,
        dev_info(&client->dev, "Found a %s chip at 0x%02x.\n", name, client->addr);
        strscpy(info->type, name, I2C_NAME_SIZE);
 
-       return -ENODEV;
+       return 0;
 }
 
 static int cy8c95x0_probe(struct i2c_client *client)