diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-02-22 08:41:22 +0300 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2024-05-08 19:03:38 +0300 |
commit | 217f036242c7f7d5cf874f00ee39807162b90794 (patch) | |
tree | 6f25a9a40f0a3fdad7066493735cd0b2d8bf1855 /drivers/extcon | |
parent | ed30a4a51bb196781c8058073ea720133a65596f (diff) | |
download | linux-217f036242c7f7d5cf874f00ee39807162b90794.tar.xz |
extcon: intel-mrfld: Switch to use dev_err_probe()
Switch to use dev_err_probe() to simplify the error path and
unify a message template.
Link: https://lore.kernel.org/lkml/20231222161954.2955905-1-andriy.shevchenko@linux.intel.com/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-intel-mrfld.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/extcon/extcon-intel-mrfld.c b/drivers/extcon/extcon-intel-mrfld.c index cd1a5f230077..e96947fb76ee 100644 --- a/drivers/extcon/extcon-intel-mrfld.c +++ b/drivers/extcon/extcon-intel-mrfld.c @@ -217,24 +217,18 @@ static int mrfld_extcon_probe(struct platform_device *pdev) return -ENOMEM; ret = devm_extcon_dev_register(dev, data->edev); - if (ret < 0) { - dev_err(dev, "can't register extcon device: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "can't register extcon device\n"); ret = devm_request_threaded_irq(dev, irq, NULL, mrfld_extcon_interrupt, IRQF_ONESHOT | IRQF_SHARED, pdev->name, data); - if (ret) { - dev_err(dev, "can't register IRQ handler: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "can't register IRQ handler\n"); ret = regmap_read(regmap, BCOVE_ID, &id); - if (ret) { - dev_err(dev, "can't read PMIC ID: %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "can't read PMIC ID\n"); data->id = id; |