Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3516467pxj; Tue, 1 Jun 2021 07:08:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHaglphiRE76yrRYRy82Uym14bGwoxRx/hD1hlutY/3MPei9TMeu7BogCC2nIieDlRD6Fy X-Received: by 2002:a05:6e02:8e8:: with SMTP id n8mr3461015ilt.48.1622556517890; Tue, 01 Jun 2021 07:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622556517; cv=none; d=google.com; s=arc-20160816; b=ihN+NxmbzihMQtOdudJOONGw/LlI0mR6OHsYg/2K7Y1TOIi5jE8cUz1JGx0IRzfyEq tQxb//BA0hrvKKWcg3GJtiXhQI8Di0vlHQ1yDuecV0KuTwBCxJl2MOXjRKVtT52twaAM BjI0mluBs05MS2JCUF+1Pp3hIPDudqsdjHDW9XzJz2ooPTtGcAG+ngP7XzK4dtFLpPzN XAaw0G9HBZyuwCHwOEFjEHcfKf5KrYDvsX2pQpClS/qqv/aCn2QW5CCdS6hI1uRDe5K2 wzIWh78CwcMxoVcO70G4ImOoIwMapbvVJwaX9xKxlVu4i4YXJZPZ06JRMLR4buZ7Swun ROAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5IhCMI00073d3d7I4wXDNY1Cfx6aA/Opytvxoeuv1DU=; b=iannDqY2AuJSGz9B0/YQStBWG4J57vhTTEp/Ydx//NVUzZj9bSpRPkEIEr/l+O6YC6 MnslKO+hsyJoVn/769XpPitbhhVV19hFg4V5d/t5JyiD6y4Q5xAmDk4ZPVb0IGfio7QC fbBBSMwYhuZ+bxnaiaIeniC82cm1aaJh+FDH8bwoAgHXEhDfLO0H2hZhKLo6grQp30Je npWLP2oSyYCdac3HE4ku4k4zx+CHB0711IGkNNk5eM2DR8BoEmLCIIgBhJGjVG4uC5zc QG/pR3YDbp2Pg6jT7xYmRAce4YSz4t2bij0lJlrJc7t3cOla9vcib3zyEq3LF6jucH1C TIVA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si18112649jat.42.2021.06.01.07.08.21; Tue, 01 Jun 2021 07:08:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234224AbhFAOIM (ORCPT + 99 others); Tue, 1 Jun 2021 10:08:12 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2935 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbhFAOIK (ORCPT ); Tue, 1 Jun 2021 10:08:10 -0400 Received: from dggeme760-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FvYm21F83z67Zn; Tue, 1 Jun 2021 22:03:30 +0800 (CST) Received: from localhost.localdomain (10.175.104.82) by dggeme760-chm.china.huawei.com (10.3.19.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 1 Jun 2021 22:06:26 +0800 From: Zheng Yongjun To: , , , CC: , , Zheng Yongjun Subject: [PATCH -next] media: atomisp: Remove unneeded if-null-free check Date: Tue, 1 Jun 2021 22:20:05 +0800 Message-ID: <20210601142005.4132018-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.82] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme760-chm.china.huawei.com (10.3.19.106) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eliminate the following coccicheck warning: drivers/staging/media/atomisp/pci/sh_css_firmware.c:369:4-10: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Zheng Yongjun --- drivers/staging/media/atomisp/pci/sh_css_firmware.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.c b/drivers/staging/media/atomisp/pci/sh_css_firmware.c index f4ce8ace9d50..980fc09fcc8b 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_firmware.c +++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.c @@ -365,8 +365,7 @@ void sh_css_unload_firmware(void) for (i = 0; i < sh_css_num_binaries; i++) { if (fw_minibuffer[i].name) kfree((void *)fw_minibuffer[i].name); - if (fw_minibuffer[i].buffer) - kvfree(fw_minibuffer[i].buffer); + kvfree(fw_minibuffer[i].buffer); } kfree(fw_minibuffer); fw_minibuffer = NULL; -- 2.25.1