]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: Don't print an error if ptp_kvm is not supported
authorJon Hunter <jonathanh@nvidia.com>
Tue, 20 Apr 2021 13:24:19 +0000 (14:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 20 Apr 2021 16:17:55 +0000 (17:17 +0100)
commit3af1e8732e886a2bdda9278cafc8355a77ff7039
tree3864cb568a5d6558eb2e454aec95bcf91d94c827
parenta957547f8cd54e0f24d048f9aeaf491075b76e9b
ptp: Don't print an error if ptp_kvm is not supported

Commit eb6ead42b4f7 ("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: eb6ead42b4f7 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210420132419.1318148-1-jonathanh@nvidia.com
drivers/ptp/ptp_kvm_common.c