Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp293319imm; Thu, 16 Aug 2018 20:50:43 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxnyK69/hRfce+1H8HebaMHablWpb6z5Vo6HskEBQcKw8WK3T89FRZxQnJX7Dh4BuxVJFFC X-Received: by 2002:a17:902:bd4a:: with SMTP id b10-v6mr32009439plx.209.1534477843246; Thu, 16 Aug 2018 20:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534477843; cv=none; d=google.com; s=arc-20160816; b=Hrc5iZtogavAIfcI+tOJR/v+F37MEkBcq6eCwt3bQja9vibKCKhTZglc00tNkNfBnX 6XYnxMPmflODZR//KtzcZgW1/cDWSk8yB0h9WBe5+lSO/CpShimC4KvYjmZ2ZOOIfDu2 6PJuhudus0gMGUh3J6mffzMnkjpk3PKze2UEjKeutkqL8QIkoVB3xSG780rF35/kqLAo 5IBgeHHWEPe9W1BX7e6aU/0/zQzJGvxEGe+uaHKWoRPzQq8yAx0loL/J7Of7bYl1lGqA Ol6fEOVDam7b3zvKpucWEDj+IUrUEL/QsFCCBZRmmZQohA+ZDRYK/W9St5yTvZ0+uL2K 2fiQ== 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=Zdaa+1hZAY5yDr5GaHL/S+VYoBMFaiFuU+/u5zWbBAY=; b=zfWx/Cnr1nTUqJ7+IX9JjY6noUQVfs3lwK7rtaUR+qnCwY1Q5MkIhxChCcjBbpBikU i/SRSPZ6knrkLnDslT5ilc4WrrmwhSWbiHRafnSn61mu/9V0pQUMsUzKBBPuYtoWHToe nB+uHOlZ88McXUwZmsF5qNvajIEQecmoXmxT+dhCc34oe6ox8OkKNFaZ/3rlabVZMZn+ 3dPZyJJGX3azx6KDOGjPkopo5uh89sVp78Bb7TubTA88kKubQNIj5oMD5U5ZMLhB9WKu NxtNf9ylpZ0dXiqxZ+6+py82ldcTmvHW2t6U75q4J7GtYRjFfIakKd2x5pPqiOkMHl8i gU2w== 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 66-v6si1143658plb.428.2018.08.16.20.50.27; Thu, 16 Aug 2018 20:50:43 -0700 (PDT) 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 S1726094AbeHQGvG (ORCPT + 99 others); Fri, 17 Aug 2018 02:51:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47534 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725766AbeHQGvF (ORCPT ); Fri, 17 Aug 2018 02:51:05 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 338264FE991B5; Fri, 17 Aug 2018 11:49:18 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.399.0; Fri, 17 Aug 2018 11:49:17 +0800 From: zhong jiang To: , CC: Subject: [PATCH] media: NULL check is meaningless before debugfs_remove_recursive Date: Fri, 17 Aug 2018 11:37:26 +0800 Message-ID: <1534477046-13795-1-git-send-email-zhongjiang@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 debugfs_remove_recursive has taken null pointer into account. so remove the unneeded check. Signed-off-by: zhong jiang --- 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); } -- 1.7.12.4