[PATCH 1/2] ptp: ptp_s390: Add missing CC check for ptff()

From: Sven Schnelle

Date: Tue Jul 14 2026 - 04:51:45 EST


The code doesn't honor the returned condition code when issuing
the PTFF_QPT call. Fix this by checking the return code and returning
EIO if it is not zero.

Fixes: 2d7de7a3010d ("s390/time: Add PtP driver")
Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxx
---
drivers/ptp/ptp_s390.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_s390.c b/drivers/ptp/ptp_s390.c
index 29618eb9bf44..7299c3aae65f 100644
--- a/drivers/ptp/ptp_s390.c
+++ b/drivers/ptp/ptp_s390.c
@@ -48,7 +48,8 @@ static int ptp_s390_qpt_gettime(struct ptp_clock_info *ptp,
{
unsigned long tod;

- ptff(&tod, sizeof(tod), PTFF_QPT);
+ if (ptff(&tod, sizeof(tod), PTFF_QPT) != 0)
+ return -EOPNOTSUPP;
*ts = tod_to_timespec64(tod);
return 0;
}
--
2.53.0