media: ar0521: Use %pe format specifier
The %pe format specifier is designed to print error pointers. It prints a symbolic error name (eg. -EINVAL) and it makes the code simpler by omitting PTR_ERR() This patch fixes this cocci report: ./i2c/ar0521.c:1113:31-38: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Krzysztof Hałasa <khalasa@piap.pl> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
ce5bf59e0e
commit
435becbe2e
@@ -1109,8 +1109,8 @@ static int ar0521_probe(struct i2c_client *client)
|
||||
ar0521_supply_names[cnt]);
|
||||
|
||||
if (IS_ERR(supply)) {
|
||||
dev_info(dev, "no %s regulator found: %li\n",
|
||||
ar0521_supply_names[cnt], PTR_ERR(supply));
|
||||
dev_info(dev, "no %s regulator found: %pe\n",
|
||||
ar0521_supply_names[cnt], supply);
|
||||
return PTR_ERR(supply);
|
||||
}
|
||||
sensor->supplies[cnt] = supply;
|
||||
|
||||
Reference in New Issue
Block a user