mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: i2c: imx335: 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/imx335.c:1013:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> 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
c268a1e9af
commit
03e5b11a06
@@ -1009,8 +1009,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
|
||||
imx335->reset_gpio = devm_gpiod_get_optional(imx335->dev, "reset",
|
||||
GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(imx335->reset_gpio)) {
|
||||
dev_err(imx335->dev, "failed to get reset gpio %ld\n",
|
||||
PTR_ERR(imx335->reset_gpio));
|
||||
dev_err(imx335->dev, "failed to get reset gpio %pe\n",
|
||||
imx335->reset_gpio);
|
||||
return PTR_ERR(imx335->reset_gpio);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user