On Mon Oct 13 14:14:42 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:
> ./dvb-core/dvbdev.c:575:48-55: WARNING: Consider using %pe to print PTR_ERR()
> 
> Signed-off-by: Ricardo Ribalda <[email protected]>
> Acked-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/dvb-core/dvbdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 9df7c213716a..8b980d371a45 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -571,8 +571,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct 
dvb_device **pdvbdev,
                               MKDEV(DVB_MAJOR, minor),
                               dvbdev, "dvb%d.%s%d", adap->num, dnames[type], 
id);
        if (IS_ERR(clsdev)) {
-               pr_err("%s: failed to create device dvb%d.%s%d (%ld)\n",
-                      __func__, adap->num, dnames[type], id, PTR_ERR(clsdev));
+               pr_err("%s: failed to create device dvb%d.%s%d (%pe)\n",
+                      __func__, adap->num, dnames[type], id, clsdev);
                if (new_node) {
                        list_del(&new_node->list_head);
                        kfree(dvbdevfops);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to