From: Steven Rostedt <[email protected]>

When the mmiotrace trace was first created, it allocated a descriptor in
its pipe_open() method. Since there was no pipe_close() method when it was
created (in May of 2008, and pipe_close() was added in December of 2009),
it cleaned up the allocated descriptors in the read.

Now that the clean up is in the pipe_close() method that now exists,
remove the clean up from the read as it is no longer needed.

Link: https://lore.kernel.org/all/[email protected]/
Link: https://lore.kernel.org/all/[email protected]/

Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
Changses since v1 : 
https://patch.msgid.link/[email protected]

- Broke it up into two patches

 kernel/trace/trace_mmiotrace.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c
index 77120d467e11..0034d6af3d9d 100644
--- a/kernel/trace/trace_mmiotrace.c
+++ b/kernel/trace/trace_mmiotrace.c
@@ -152,11 +152,6 @@ static ssize_t mmio_read(struct trace_iterator *iter, 
struct file *filp,
        mmio_print_pcidev(s, hiter->dev);
        hiter->dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, hiter->dev);
 
-       if (!hiter->dev) {
-               destroy_header_iter(hiter);
-               iter->private = NULL;
-       }
-
 print_out:
        ret = trace_seq_to_user(s, ubuf, cnt);
        return (ret == -EBUSY) ? 0 : ret;
-- 
2.53.0



Reply via email to