mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
media: i2c: mt9m111: 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/mt9m111.c:1290:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
e8fd8080e7
commit
e027f53e05
|
|
@ -1286,8 +1286,8 @@ static int mt9m111_probe(struct i2c_client *client)
|
|||
|
||||
mt9m111->regulator = devm_regulator_get(&client->dev, "vdd");
|
||||
if (IS_ERR(mt9m111->regulator)) {
|
||||
dev_err(&client->dev, "regulator not found: %ld\n",
|
||||
PTR_ERR(mt9m111->regulator));
|
||||
dev_err(&client->dev, "regulator not found: %pe\n",
|
||||
mt9m111->regulator);
|
||||
return PTR_ERR(mt9m111->regulator);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user