Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ti: cal 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:
./platform/ti/cal/cal.c:1111:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Ricardo Ribalda and committed by
Hans Verkuil
efb83db2 2639358e

+1 -2
+1 -2
drivers/media/platform/ti/cal/cal.c
··· 1107 1107 return 0; 1108 1108 } 1109 1109 1110 - dev_warn(cal->dev, "failed to get ti,camerrx-control: %ld\n", 1111 - PTR_ERR(syscon)); 1110 + dev_warn(cal->dev, "failed to get ti,camerrx-control: %pe\n", syscon); 1112 1111 1113 1112 /* 1114 1113 * Backward DTS compatibility. If syscon entry is not present then