On Fri, May 03, 2024 at 11:08:47AM +0800, Weifeng Liu wrote: > Emits messages upon errors during probing of SAM. Hopefully this could > provide useful context to user for the purpose of diagnosis when > something miserable happen. ... > acpi_status astatus; > int status; > > - if (gpiod_count(&serdev->dev, NULL) < 0) > - return -ENODEV; > + status = gpiod_count(&serdev->dev, NULL); > + if (status < 0) > + return dev_err_probe(&serdev->dev, status, "no GPIO found\n"); Note, with struct device *dev = &serdev->dev; this and other lines become shorter and you may join some of them... ... > + status = dev_err_probe(&serdev->dev, -ENXIO, > + "failed to setup serdev\n"); ...like here: status = dev_err_probe(dev, -ENXIO, "failed to setup serdev\n"); ... > + dev_err_probe(&serdev->dev, status, > + "failed to get firmware version\n"); ...or here. ... With the above being addressed, Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> -- With Best Regards, Andy Shevchenko