Received: by 10.223.185.116 with SMTP id b49csp1787149wrg; Thu, 22 Feb 2018 03:10:14 -0800 (PST) X-Google-Smtp-Source: AH8x224tzId8sdQvOv+aqlcTFDy4+jUlCzzPO4PXRCDGgsBpDuuKCtD1h5W6QazKB8/e63Idzkcz X-Received: by 10.99.112.20 with SMTP id l20mr5475203pgc.412.1519297814183; Thu, 22 Feb 2018 03:10:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519297814; cv=none; d=google.com; s=arc-20160816; b=fGFLn6tZprhOl6rgG2Av7t4ce8OyKWb43pAuShwlAmZMO+YwFK56yXowB/UV3lHMVP Q4bUtsc9SzQaIVwCN9klnATk6T+U33ydHXeztk7a8w1ngvipESSEh0IBr1kjS5Jk9feW VMqT3k/ofuGsAdOdl5RftNLP0VcDSyJ4IpC7NWOi6v19MGlH6UmdloJk10eaQe0nwh67 DlHIwHxsXZS6U3YV08CMI0EC2xIXOwlk9IbDYQXEA2ST3cluQ+6OLUdzbFQoccno0oUu CUb++0dJ03epspEmiiBuoKVglV83FACoLMw0RfhUj1Pk0eYjx2yVjp3E00nQyEwMYjq7 40BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=pYmVlg3xa3JfiJXu6bA7nIbOhlPNidjm5AfURrsxeqs=; b=o5D2/1SIIogjWv867w/LlmiYG6MpJkXnFayVmyXn+TL/nEP8qyaBXKuvpPij+uCVwZ wrShez4ad7Nvh8S5DvXoq1d9RGWisy7qbZq0U/oVBTZHgHLoGkgO8eyKE/No2pQ2Y5Ku 6Y3CBLK7rOvqPAYXTXNHBukqaDGzhDTXMsNPnBdK6wZi7UyDDRKU3C/i+JiY6vPY+Clf wWBA8GjgZMD/w77O32pxgIssOqaSfftP08SYoDIF9HW/oQs7lq0ygMOTLZJ46+zEYkOD KqGWRt1QPigPpdclCqIpYLq6Daw1DD+huD131P6tIxs2eYm/TiJ2mzoYuO33mTevyW1d uORg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6-v6si1535476plo.104.2018.02.22.03.09.59; Thu, 22 Feb 2018 03:10:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753592AbeBVLIa (ORCPT + 99 others); Thu, 22 Feb 2018 06:08:30 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:5661 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753399AbeBVLIR (ORCPT ); Thu, 22 Feb 2018 06:08:17 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9652ED64BB5AE; Thu, 22 Feb 2018 19:07:59 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.361.1; Thu, 22 Feb 2018 19:07:50 +0800 From: Yisheng Xie To: CC: , , , , Yisheng Xie Subject: [PATCH -next 1/2] staging: android: ion: Remove check of debug_file Date: Thu, 22 Feb 2018 18:58:39 +0800 Message-ID: <1519297120-26308-1-git-send-email-xieyisheng1@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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