Message ID | 20240328-ltc2983-misc-improv-v4-1-0cc428c07cd5@analog.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | iio: temperature: ltc2983: small improvements | expand |
diff --git a/include/linux/dev_printk.h b/include/linux/dev_printk.h index 6bfe70decc9f..64484d092a77 100644 --- a/include/linux/dev_printk.h +++ b/include/linux/dev_printk.h @@ -276,4 +276,9 @@ do { \ __printf(3, 4) int dev_err_probe(const struct device *dev, int err, const char *fmt, ...); +/* Simple helper for dev_err_probe() when ERR_PTR() is to be returned. */ +#define dev_errp_probe(dev, ___err, fmt, ...) ({ \ + ERR_PTR(dev_err_probe(dev, ___err, fmt, ##__VA_ARGS__)); \ +}) + #endif /* _DEVICE_PRINTK_H_ */