On Mon Oct 13 14:14:56 2025 +0000, Ricardo Ribalda wrote:
> 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/ov5675.c:1188:9-16: WARNING: Consider using %pe to print PTR_ERR()
> 
> Signed-off-by: Ricardo Ribalda <[email protected]>
> Reviewed-by: Bryan O'Donoghue <[email protected]>
> Acked-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/i2c/ov5675.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
index 30e27d39ee44..ea26df328189 100644
--- a/drivers/media/i2c/ov5675.c
+++ b/drivers/media/i2c/ov5675.c
@@ -1184,8 +1184,8 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
        ov5675->xvclk = devm_v4l2_sensor_clk_get(dev, NULL);
        if (IS_ERR(ov5675->xvclk))
                return dev_err_probe(dev, PTR_ERR(ov5675->xvclk),
-                                    "failed to get xvclk: %ld\n",
-                                    PTR_ERR(ov5675->xvclk));
+                                    "failed to get xvclk: %pe\n",
+                                    ov5675->xvclk);
 
        xvclk_rate = clk_get_rate(ov5675->xvclk);
        if (xvclk_rate != OV5675_XVCLK_19_2) {
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to