From: Ricardo Ribalda Date: Mon, 13 Oct 2025 14:14:47 +0000 (+0000) Subject: media: i2c: ds90ub913: Use %pe format specifier X-Git-Tag: v6.19-rc1~159^2~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b4677ed2a26ee1f59035f949742489ede317f61;p=thirdparty%2Flinux.git media: i2c: ds90ub913: 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/ds90ub913.c:625:44-51: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Ricardo Ribalda Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c index 73150061ea458..e97e499b04e6c 100644 --- a/drivers/media/i2c/ds90ub913.c +++ b/drivers/media/i2c/ds90ub913.c @@ -622,7 +622,7 @@ static int ub913_v4l2_notifier_register(struct ub913_data *priv) fwnode_handle_put(ep_fwnode); if (IS_ERR(asd)) { - dev_err(dev, "Failed to add subdev: %ld", PTR_ERR(asd)); + dev_err(dev, "Failed to add subdev: %pe", asd); v4l2_async_nf_cleanup(&priv->notifier); return PTR_ERR(asd); }