diff options
author | Andrzej Hajda <[email protected]> | 2020-07-13 16:43:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-07-30 09:03:43 +0200 |
commit | a787e5400a1ceeb0ef92d71ec43aeb35b1fa1334 (patch) | |
tree | 3ce6478f5fa4385d4443507ad13231d123579c78 /scripts/gdb/linux | |
parent | 654888327e9f655a9d55ad477a9583e90e8c9b5c (diff) |
driver core: add device probe log helper
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 <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions