Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db528428 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: Add NULL check in debugfs show callback"

parents 86fc4bae 4201df72
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */

#include <linux/debugfs.h>
#include <linux/device.h>
@@ -2184,6 +2184,9 @@ int mhi_debugfs_mhi_event_show(struct seq_file *m, void *d)

	int i;

	if (!mhi_cntrl->mhi_ctxt)
		return -ENODEV;

	seq_printf(m, "[%llu ns]:\n", sched_clock());

	er_ctxt = mhi_cntrl->mhi_ctxt->er_ctxt;
@@ -2217,6 +2220,9 @@ int mhi_debugfs_mhi_chan_show(struct seq_file *m, void *d)
	struct mhi_chan_ctxt *chan_ctxt;
	int i;

	if (!mhi_cntrl->mhi_ctxt)
		return -ENODEV;

	seq_printf(m, "[%llu ns]:\n", sched_clock());

	mhi_chan = mhi_cntrl->mhi_chan;