Thread (4 messages) 4 messages, 2 authors, 9d ago
COOLING8d

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

From: Sven Schnelle <svens@linux.ibm.com>
Date: 2026-07-14 08:49:38
Also in: linux-s390, lkml
Subsystem: networking drivers, ptp hardware clock support, s390 ptp driver, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Richard Cochran, Sven Schnelle, Linus Torvalds

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@linux.ibm.com>
Cc: stable@kernel.org
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help