Skip to content

Commit a86ed2c

Browse files
jonhunterMarc Zyngier
authored andcommitted
ptp: Don't print an error if ptp_kvm is not supported
Commit 300bb1f ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") enable ptp_kvm support for ARM platforms and for any ARM platform that does not support this, the following error message is displayed ... ERR KERN fail to initialize ptp_kvm For platforms that do not support ptp_kvm this error is a bit misleading and so fix this by only printing this message if the error returned by kvm_arch_ptp_init() is not -EOPNOTSUPP. Note that -EOPNOTSUPP is only returned by ARM platforms today if ptp_kvm is not supported. Fixes: 300bb1f ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") Signed-off-by: Jon Hunter <[email protected]> Acked-by: Richard Cochran <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 127ce0b commit a86ed2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/ptp/ptp_kvm_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ static int __init ptp_kvm_init(void)
138138

139139
ret = kvm_arch_ptp_init();
140140
if (ret) {
141-
pr_err("fail to initialize ptp_kvm");
141+
if (ret != -EOPNOTSUPP)
142+
pr_err("fail to initialize ptp_kvm");
142143
return ret;
143144
}
144145

0 commit comments

Comments
 (0)