Received: by 10.223.164.202 with SMTP id h10csp2076753wrb; Sun, 12 Nov 2017 00:43:14 -0800 (PST) X-Google-Smtp-Source: AGs4zMbX9hY+J0QQd/P1jsVmgfchbP/0zo7QpvyhsCanIyLyL+lHPqPk42XElEDhZXEZFJEroHDT X-Received: by 10.101.100.65 with SMTP id s1mr5369981pgv.185.1510476194381; Sun, 12 Nov 2017 00:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510476194; cv=none; d=google.com; s=arc-20160816; b=QO+LpcjEHBfBbSyGGIQhqMreDIg7i0WFTBWb0K1mj2q+ybbwq3ppVbk7OoixueEa/S nvirRe6tGOPxxqbI4NoEiVEgfJSjt25eqwsKOBzBiRinn1+7tQS4l3EoS5ycBdx4z1QC LC7TlRePMd3YVhfrQRF2mN8WbL3cLECcpFkTf/+PNu/F9DX/9zXZJebwrsqOWfL1z0j1 P1OGXKCvP3omoJ5FJH6H8WNRuLREEzb5WB0uRwia5XDJhl2kdH0xZgpRq/HqUs9Rp49W gRCPtKjtTU8Z1Wa/u1coqjuHD1zY9XpoVa502SfLUDs//jFhi2Ppv9G+I3OzD1RgvP80 9zdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=5fLNMU0p3FDyahdQO/TxhLXYtB2aDzki6nYSxhwmvHM=; b=STILBHHs/Lcn2EA8baIvygrwZOQiwx5xFwPMdNg5CD7u/4789xJ84mWyN1G/2XswjQ OpDKyt8KY4UcigfTK1NA8EFYVoZvbrpJnMFQghrEnHzFEVQ+2iDHwdqJ0CeiUSVVpIij w2/m+1vj4yyUAnOPktSthDiTyfPbXEOcXxug8aBxGFsWlghSidDqsDlR8THJPAtL8jZ+ 4I6HMJ/dzT2GlU9k/3mY8uGdrDXIotLgMk5c6+OmGO/t9cH5ZNGF+TzNwyJwp4IA0ok4 k467DGb1igtY0KzoDCrTCy6eWFFgSs4o1Wiv+UBpKtOITqtfIK6/yNy7DPjC8spCG6er oANw== 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 f88si13244278pfk.57.2017.11.12.00.43.00; Sun, 12 Nov 2017 00:43: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 S1753160AbdKLIlP (ORCPT + 87 others); Sun, 12 Nov 2017 03:41:15 -0500 Received: from gateway30.websitewelcome.com ([192.185.194.16]:25972 "EHLO gateway30.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbdKLIlO (ORCPT ); Sun, 12 Nov 2017 03:41:14 -0500 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway30.websitewelcome.com (Postfix) with ESMTP id EE6AF13100 for ; Sun, 12 Nov 2017 02:19:00 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id DnToesA76RtUXDnToe2P97; Sun, 12 Nov 2017 02:19:00 -0600 Received: from [189.175.248.21] (port=58626 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1eDnTo-002q1g-E3; Sun, 12 Nov 2017 02:19:00 -0600 Date: Sun, 12 Nov 2017 02:18:59 -0600 From: "Gustavo A. R. Silva" To: Laurent Pinchart , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] usb: uvc_debugfs: remove unnecessary NULL check before debugfs_remove_recursive Message-ID: <20171112081859.GA19079@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.175.248.21 X-Source-L: No X-Exim-ID: 1eDnTo-002q1g-E3 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.175.248.21]:58626 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NULL check before freeing functions like debugfs_remove_recursive is not needed. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc/uvc_debugfs.c index 368f8f8..6995aeb 100644 --- a/drivers/media/usb/uvc/uvc_debugfs.c +++ b/drivers/media/usb/uvc/uvc_debugfs.c @@ -128,6 +128,5 @@ void uvc_debugfs_init(void) void uvc_debugfs_cleanup(void) { - if (uvc_debugfs_root_dir != NULL) - debugfs_remove_recursive(uvc_debugfs_root_dir); + debugfs_remove_recursive(uvc_debugfs_root_dir); } -- 2.7.4 From 1583027332401103386@xxx Fri Nov 03 07:01:49 +0000 2017 X-GM-THRID: 1583024584019126101 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread