mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
media: i2c: ov5693: 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/ov5693.c:1296:9-16: 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
24dc83173f
commit
ca1c388ad0
1 changed files with 2 additions and 2 deletions
|
|
@ -1292,8 +1292,8 @@ static int ov5693_probe(struct i2c_client *client)
|
|||
ov5693->xvclk = devm_v4l2_sensor_clk_get(&client->dev, "xvclk");
|
||||
if (IS_ERR(ov5693->xvclk))
|
||||
return dev_err_probe(&client->dev, PTR_ERR(ov5693->xvclk),
|
||||
"failed to get xvclk: %ld\n",
|
||||
PTR_ERR(ov5693->xvclk));
|
||||
"failed to get xvclk: %pe\n",
|
||||
ov5693->xvclk);
|
||||
|
||||
xvclk_rate = clk_get_rate(ov5693->xvclk);
|
||||
if (xvclk_rate != OV5693_XVCLK_FREQ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue