lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519297120-26308-1-git-send-email-xieyisheng1@huawei.com>
Date:   Thu, 22 Feb 2018 18:58:39 +0800
From:   Yisheng Xie <xieyisheng1@...wei.com>
To:     <gregkh@...uxfoundation.org>
CC:     <labbott@...hat.com>, <sumit.semwal@...aro.org>,
        <devel@...verdev.osuosl.org>, <linux-kernel@...r.kernel.org>,
        Yisheng Xie <xieyisheng1@...wei.com>
Subject: [PATCH -next 1/2] staging: android: ion: Remove check of debug_file

There's no need to check the return value of debug_file for it is just a
debugfs and we will go on the following process if we failed to create
debug_file. So just remove it.

Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
---
 drivers/staging/android/ion/ion.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 74d9a4e..0606d50 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -522,7 +522,6 @@ static int debug_shrink_get(void *data, u64 *val)
 
 void ion_device_add_heap(struct ion_heap *heap)
 {
-	struct dentry *debug_file;
 	struct ion_device *dev = internal_dev;
 	int ret;
 
@@ -556,12 +555,8 @@ void ion_device_add_heap(struct ion_heap *heap)
 		char debug_name[64];
 
 		snprintf(debug_name, 64, "%s_shrink", heap->name);
-		debug_file = debugfs_create_file(debug_name,
-						 0644, dev->debug_root, heap,
-						 &debug_shrink_fops);
-		if (!debug_file)
-			pr_err("Failed to create ion heap shrinker debugfs at %s\n",
-			       debug_name);
+		debugfs_create_file(debug_name, 0644, dev->debug_root,
+				    heap, &debug_shrink_fops);
 	}
 
 	dev->heap_cnt++;
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ