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

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>

authored by

Ricardo Ribalda and committed by
Hans Verkuil
ca1c388a 24dc8317

+2 -2
+2 -2
drivers/media/i2c/ov5693.c
··· 1292 1292 ov5693->xvclk = devm_v4l2_sensor_clk_get(&client->dev, "xvclk"); 1293 1293 if (IS_ERR(ov5693->xvclk)) 1294 1294 return dev_err_probe(&client->dev, PTR_ERR(ov5693->xvclk), 1295 - "failed to get xvclk: %ld\n", 1296 - PTR_ERR(ov5693->xvclk)); 1295 + "failed to get xvclk: %pe\n", 1296 + ov5693->xvclk); 1297 1297 1298 1298 xvclk_rate = clk_get_rate(ov5693->xvclk); 1299 1299 if (xvclk_rate != OV5693_XVCLK_FREQ)