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

Commit c29e0eff authored by Rajat Gupta's avatar Rajat Gupta
Browse files

disp: msm: dp: skip creating dir when debugfs is disabled



When CONFIG_DEBUG_FS is disabled skip creating root directory.

Change-Id: I97bed925392b781b73687164ca55e6cb09f951fc
Signed-off-by: default avatarRajat Gupta <rajatgu@codeaurora.org>
parent e54eff08
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -1912,6 +1912,12 @@ static int dp_debug_init(struct dp_debug *dp_debug)
		struct dp_debug_private, dp_debug);
	struct dentry *dir, *file;

	if (!IS_ENABLED(CONFIG_DEBUG_FS)) {
		DP_WARN("Not creating debug root dir.");
		debug->root = NULL;
		return 0;
	}

	dir = debugfs_create_dir(DEBUG_NAME, NULL);
	if (IS_ERR_OR_NULL(dir)) {
		if (!dir)