Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: Annotate dev_err_probe() with __must_check

We have got already new users of this API which interpret it differently
and miss the opportunity to optimize their code.

In order to avoid similar cases in the future, annotate dev_err_probe()
with __must_check.

Fixes: a787e5400a1c ("driver core: add device probe log helper")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200826104459.81979-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
e1f82a0d f5514c91

+1 -1
+1 -1
include/linux/device.h
··· 931 931 void device_links_supplier_sync_state_resume(void); 932 932 933 933 extern __printf(3, 4) 934 - int dev_err_probe(const struct device *dev, int err, const char *fmt, ...); 934 + int __must_check dev_err_probe(const struct device *dev, int err, const char *fmt, ...); 935 935 936 936 /* Create alias, so I can be autoloaded. */ 937 937 #define MODULE_ALIAS_CHARDEV(major,minor) \