mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: i2c: imx412: 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/imx412.c:931:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> 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
03e5b11a06
commit
f7be2c2e59
@@ -927,8 +927,8 @@ static int imx412_parse_hw_config(struct imx412 *imx412)
|
||||
imx412->reset_gpio = devm_gpiod_get_optional(imx412->dev, "reset",
|
||||
GPIOD_OUT_LOW);
|
||||
if (IS_ERR(imx412->reset_gpio)) {
|
||||
dev_err(imx412->dev, "failed to get reset gpio %ld\n",
|
||||
PTR_ERR(imx412->reset_gpio));
|
||||
dev_err(imx412->dev, "failed to get reset gpio %pe\n",
|
||||
imx412->reset_gpio);
|
||||
return PTR_ERR(imx412->reset_gpio);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user