summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2023-12-15 07:05:20 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-12-15 07:30:52 +0100
commitc67f8a13be4e9ffc862c7f60ec97a799a1547486 (patch)
tree67e7d525f428ce5df45842481616700b1975abc3 /drivers/input/misc
parentInput: da9063 - drop redundant prints in probe() (diff)
downloadlinux-c67f8a13be4e9ffc862c7f60ec97a799a1547486.tar.xz
linux-c67f8a13be4e9ffc862c7f60ec97a799a1547486.zip
Input: da9063 - use dev_err_probe()
Replace dev_err()->dev_err_probe() to simplify probe(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20231213214803.9931-4-biju.das.jz@bp.renesas.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/da9063_onkey.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index 5483a0576155..a8b7f1cd0ec2 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -195,10 +195,9 @@ static int da9063_onkey_probe(struct platform_device *pdev)
onkey->dev = &pdev->dev;
onkey->regmap = dev_get_regmap(pdev->dev.parent, NULL);
- if (!onkey->regmap) {
- dev_err(&pdev->dev, "Parent regmap unavailable.\n");
- return -ENXIO;
- }
+ if (!onkey->regmap)
+ return dev_err_probe(&pdev->dev, -ENXIO,
+ "Parent regmap unavailable.\n");
onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
"dlg,disable-key-power");
@@ -228,11 +227,9 @@ static int da9063_onkey_probe(struct platform_device *pdev)
NULL, da9063_onkey_irq_handler,
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
"ONKEY", onkey);
- if (error) {
- dev_err(&pdev->dev,
- "Failed to request IRQ %d: %d\n", irq, error);
- return error;
- }
+ if (error)
+ return dev_err_probe(&pdev->dev, error,
+ "Failed to allocate onkey IRQ\n");
error = dev_pm_set_wake_irq(&pdev->dev, irq);
if (error)