Re: [PATCH 1/5] iio: Remove redundant probe error messages for HID device drivers
From: Joshua Crofts
Date: Thu Nov 05 2026 - 11:09:15 EST
On Thu, 5 Nov 2026 14:40:36 +0100
Joshua Crofts <crofts@xxxxxxxxxx> wrote:
> On Thu, 05 Nov 2026 18:11:43 +0530
> Sanjay Chitroda via B4 Relay <devnull+sanjayembeddedse.gmail.com@xxxxxxxxxx> wrote:
>
> ...
>
> > @@ -377,20 +377,16 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
> >
> > ret = devm_hid_sensor_setup_trigger(dev, indio_dev, name,
> > &accel_state->common_attributes);
> > - if (ret < 0) {
> > - dev_err(&pdev->dev, "trigger setup failed\n");
> > + if (ret < 0)
>
> You could also remove the comparison and just change the checks to `if (ret)`,
> as devm_hid_sensor_setup_trigger() always returns zero on success.
I suppose you could also add a precursor patch that changes `return ret` to
`return 0` in devm_hid_sensor_setup_trigger() on success.
--
Kind regards,
Joshua Crofts