From: Ricardo Ribalda Date: Mon, 13 Oct 2025 14:14:42 +0000 (+0000) Subject: media: dvbdev: Use %pe format specifier X-Git-Tag: v6.19-rc1~159^2~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6493b52971ac94b1af3e83a819643e767ee44b4;p=thirdparty%2Fkernel%2Flinux.git media: dvbdev: 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: ./dvb-core/dvbdev.c:575:48-55: 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/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 9df7c213716ae..8b980d371a45e 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);