Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1592969ybg; Wed, 29 Jul 2020 19:31:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk3HurODDX1RPbuK8HFQ3QDu6eqki0ygNsfBhpzLdH7KuASfwnFm5wvGmvT/8JmGEfp+/6 X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr562592ejc.44.1596076270786; Wed, 29 Jul 2020 19:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596076270; cv=none; d=google.com; s=arc-20160816; b=vWJxns0ZtY74oK+Wt6whaouUALWgoa5Z9Mp/Ye5YfoHnj4FFt/AvOa50bcf4R6jdir U/Lxk/Hws+LnTukvDeYKKq/fS10fDGAogpHudUwLd3mL12MXhAUJSiSUQSgm8YgvzuUe YabCT+oM0vfEThNcKEmtaVwMIUDcOstRku0kM9PmSKkvj91Xk4ojuEQelgH5KqUVkcfq kjp8JaWBQKXZCT2M/qaGf9IMMzt67iGHdoWmFEglr4TXWEWpnLpr0BFhHVzPi5Oz/Zhx I3e1/j+Utc0a5DkgttgJ8wnUGIARIBf/olNTyW5PcJW9ewNLIqwLp8pLdl+3ljhiwBB7 2U/g== 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; bh=U5gh7B3ulk/3cbBxd2XPHUkuPppNFq2htNZiw3zWZuI=; b=NoLzPgjIQAFx7gpBLNXJ9UDe/nP6nYNBaRyQd4zsi0cJb07cCW13xQoY5sIkHA5YBT BBYCxSygUOpsMPoFXRM2DZcSiTgwgNCpMmurdwnMyO0IUnCJUNQIyxTlu5FCyCdQ973b 9+O67S7H5OkQ1XRcf3BYd4Ez8Zs0Cj3kK+noLS9KK2OHOu11IL42Dfj89PpFWMWuEflT +3/79WxVygKgEvxdoIITcQ07C3L3bNghKhu9sW+6YLk6hlArrN6V2ciQyCKsGsvNUqs+ Wd3eHuyVOyMET+MhRO8u1E/NhaGkmKpBWAk4LWqKWT3sb6rjsWtze3YtvByHg/ymEW09 NfKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si2392872eds.102.2020.07.29.19.30.47; Wed, 29 Jul 2020 19:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728377AbgG3C2c (ORCPT + 99 others); Wed, 29 Jul 2020 22:28:32 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48468 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726319AbgG3C2c (ORCPT ); Wed, 29 Jul 2020 22:28:32 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8269D776C5C57E678038; Thu, 30 Jul 2020 10:28:27 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 30 Jul 2020 10:28:23 +0800 From: Li Heng To: , , CC: , Subject: [PATCH -next] um: Remove redundant NULL check Date: Thu, 30 Jul 2020 10:29:45 +0800 Message-ID: <1596076185-39276-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix below warnings reported by coccicheck: ./arch/um/drivers/vector_user.c:403:2-7: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Li Heng --- arch/um/drivers/vector_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/um/drivers/vector_user.c b/arch/um/drivers/vector_user.c index c4a0f26..e836d49 100644 --- a/arch/um/drivers/vector_user.c +++ b/arch/um/drivers/vector_user.c @@ -399,8 +399,7 @@ static struct vector_fds *user_init_fd_fds(struct arglist *ifspec) fd_cleanup: if (fd >= 0) os_close_file(fd); - if (result != NULL) - kfree(result); + kfree(result); return NULL; } -- 2.7.4