Commit 66200b58 authored by Jon Hunter's avatar Jon Hunter Committed by Dongxu Sun
Browse files

ptp: Don't print an error if ptp_kvm is not supported

mainline inclusion
from mainline-v5.13-rc1
commit a86ed2cf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8DWT1
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a86ed2cfa13c5175eb082c50a644f6bf29ac65cc



--------------------------------

Commit 300bb1fe ("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: 300bb1fe ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210420132419.1318148-1-jonathanh@nvidia.com


Signed-off-by: default avatarDongxu Sun <sundongxu3@huawei.com>
parent cad58e8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment