aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Adam Davis <[email protected]>2023-11-07 16:00:40 +0800
committerJakub Kicinski <[email protected]>2023-11-08 18:47:07 -0800
commitb714ca2ccf6a90733f6ceb14abb6ce914f8832c3 (patch)
treee594f02b1a2cd81e1fc59b0671a622c64ed4f199
parent9b818a340c0024f8b8f36a5f8e8b4eea3afa9a77 (diff)
ptp: ptp_read should not release queue
Firstly, queue is not the memory allocated in ptp_read; Secondly, other processes may block at ptp_read and wait for conditions to be met to perform read operations. Acked-by: Richard Cochran <[email protected]> Reported-and-tested-by: [email protected] Fixes: 8f5de6fb2453 ("ptp: support multiple timestamp event readers") Signed-off-by: Edward Adam Davis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/ptp/ptp_chardev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 282cd7d24077..27c1ef493617 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -585,7 +585,5 @@ ssize_t ptp_read(struct posix_clock_context *pccontext, uint rdflags,
free_event:
kfree(event);
exit:
- if (result < 0)
- ptp_release(pccontext);
return result;
}