Commit bd2334ed authored by Biju Das's avatar Biju Das Committed by Dmitry Torokhov

Input: da9063 - drop redundant prints in probe()

The memory allocation core code already prints error message in case of
OOM. So, drop additional print messages for OOM cases.

While at it, input_register_device() is already printing error messages on
failure. Drop the redundant print.
Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-3-biju.das.jz@bp.renesas.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 9594f273
...@@ -185,10 +185,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -185,10 +185,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
onkey = devm_kzalloc(&pdev->dev, sizeof(struct da9063_onkey), onkey = devm_kzalloc(&pdev->dev, sizeof(struct da9063_onkey),
GFP_KERNEL); GFP_KERNEL);
if (!onkey) { if (!onkey)
dev_err(&pdev->dev, "Failed to allocate memory.\n");
return -ENOMEM; return -ENOMEM;
}
onkey->config = device_get_match_data(&pdev->dev); onkey->config = device_get_match_data(&pdev->dev);
if (!onkey->config) if (!onkey->config)
...@@ -206,10 +204,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -206,10 +204,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
"dlg,disable-key-power"); "dlg,disable-key-power");
onkey->input = devm_input_allocate_device(&pdev->dev); onkey->input = devm_input_allocate_device(&pdev->dev);
if (!onkey->input) { if (!onkey->input)
dev_err(&pdev->dev, "Failed to allocated input device.\n");
return -ENOMEM; return -ENOMEM;
}
onkey->input->name = onkey->config->name; onkey->input->name = onkey->config->name;
snprintf(onkey->phys, sizeof(onkey->phys), "%s/input0", snprintf(onkey->phys, sizeof(onkey->phys), "%s/input0",
...@@ -221,12 +217,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -221,12 +217,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
error = devm_delayed_work_autocancel(&pdev->dev, &onkey->work, error = devm_delayed_work_autocancel(&pdev->dev, &onkey->work,
da9063_poll_on); da9063_poll_on);
if (error) { if (error)
dev_err(&pdev->dev,
"Failed to add cancel poll action: %d\n",
error);
return error; return error;
}
irq = platform_get_irq_byname(pdev, "ONKEY"); irq = platform_get_irq_byname(pdev, "ONKEY");
if (irq < 0) if (irq < 0)
...@@ -251,11 +243,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -251,11 +243,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, true); device_init_wakeup(&pdev->dev, true);
error = input_register_device(onkey->input); error = input_register_device(onkey->input);
if (error) { if (error)
dev_err(&pdev->dev,
"Failed to register input device: %d\n", error);
return error; return error;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment