-
Andrzej Hajda authored
During probe every time driver gets resource it should usually check for error printk some message if it is not -EPROBE_DEFER and return the error. This pattern is simple but requires adding few lines after any resource acquisition code, as a result it is often omitted or implemented only partially. dev_err_probe helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return dev_err_probe(dev, err, ...); Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Reviewed-by:
Rafael J. Wysocki <rafael@kernel.org> Reviewed-by:
Mark Brown <broonie@kernel.org> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200713144324.23654-2-a.hajda@samsung.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a787e540