Re: [PATCH v2 3/7] iio: magnetometer: hid-sensor-magn-3d: drop redundant probe error messages
From: Andy Shevchenko
Date: Fri Nov 27 2026 - 06:09:10 EST
On Fri, Nov 27, 2026 at 04:03:58PM +0530, Sanjay Chitroda via B4 Relay wrote:
>
> The probe path emits error messages for conditions where the failure is
> either already conveyed by the returned error code or can be identified
> from the existing debug messages in the magn_3d_parse_report().
>
> Remove the redundant error messages to reduce log noise and simplify the
> error handling code.
...
> - if (attr_count <= 0) {
> - dev_err(&pdev->dev,
> - "failed to find any supported usage attributes in report\n");
> + if (attr_count <= 0)
> return -EINVAL;
> - }
What is the meaning of attr_count < 0 value? Does it hold the error code already?
...
> static int magn_3d_parse_report(struct platform_device *pdev,
> - if (*chan_count <= 0) {
> - dev_err(&pdev->dev,
> - "failed to find any magnetic channels setup\n");
> + if (*chan_count <= 0)
> return -EINVAL;
> - }
Same question here.
--
With Best Regards,
Andy Shevchenko