projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bf5fd8c
)
hv_utils: Fix passing zero to 'PTR_ERR' warning
author
YueHaibing
<yuehaibing@huawei.com>
Fri, 14 May 2021 07:01:16 +0000
(15:01 +0800)
committer
Wei Liu
<wei.liu@kernel.org>
Tue, 18 May 2021 10:50:46 +0000
(10:50 +0000)
Sparse warn this:
drivers/hv/hv_util.c:753 hv_timesync_init() warn:
passing zero to 'PTR_ERR'
Use PTR_ERR_OR_ZERO instead of PTR_ERR to fix this.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link:
https://lore.kernel.org/r/20210514070116.16800-1-yuehaibing@huawei.com
[ wei: change %ld to %d ]
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/hv_util.c
patch
|
blob
|
history
diff --git
a/drivers/hv/hv_util.c
b/drivers/hv/hv_util.c
index
e4aefeb
..
136576c
100644
(file)
--- a/
drivers/hv/hv_util.c
+++ b/
drivers/hv/hv_util.c
@@
-750,8
+750,8
@@
static int hv_timesync_init(struct hv_util_service *srv)
*/
hv_ptp_clock = ptp_clock_register(&ptp_hyperv_info, NULL);
if (IS_ERR_OR_NULL(hv_ptp_clock)) {
- pr_err("cannot register PTP clock: %
l
d\n",
- PTR_ERR(hv_ptp_clock));
+ pr_err("cannot register PTP clock: %d\n",
+ PTR_ERR
_OR_ZERO
(hv_ptp_clock));
hv_ptp_clock = NULL;
}