Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7073804pxu; Fri, 25 Dec 2020 00:42:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvka8DMhAFkoYxj+oVLFfABht7wpFlyAN7OLEB9jK4E0QOMy1BdvCZDbRsMWIR5chiqJ1d X-Received: by 2002:a17:906:49c2:: with SMTP id w2mr29824328ejv.12.1608885740990; Fri, 25 Dec 2020 00:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608885740; cv=none; d=google.com; s=arc-20160816; b=YflsszMIgHNbg6m32uqSKf14cSEqKMvd62ZtFqrTQhPuw39dvALghur/nWFSb5zffO 8lSQd9Bz2MIiu1ms0T+iod8NFvrU47x6COjOIReM82/sm0i1fzjJKXxHagd9SMs1mshz ZewtDWBQBm58JAWrtlM3d9QUHuK84eZGAPFs2K3WObf6AyN1qXV+IK7BeIp/ROyZkrRa vD2qUfIxk/WWDQdBOJE2a9gsH8r5MmwFkfteZivQVazUCtxKDUtjzRJ8eGmTEL4BBI3W j6G6d8b91qCFYpnf/yy4GCrqbx+jolji3D8Q2LdraIugHtP124d56xuNJryYvd9H3sBU MHJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=kj0QFyh/z5ZOj8L4pMi/uAlhyczJddE5OB5T064CkRY=; b=gT++MOy4S9x/0NAoV7HTviPU0YLGLVxZJ652mH/uEm5pchMg49Eu/2rBcXD2QLFa+p G1+OsH25A/9sgR18gMowWGe4bvo0AlI8tOLQA8Jx4Sco9Dh7iVLWSUbW+Vf/fwbQ4MmK C6tgBoWQCqsJbTiAhH2Cpnco0PGMw7smD4xDgaa9OPunJpB9YnEDA4SIlHB0LRraDpNn XDLzeWH7Jzb2ktKaNu3A5hL40jLlI925+1iAg2Zc6GQCdRkpOpOTPcYEyZjI3XLULLFa 9f4NNyKj75OOL4TJJwUlojbRNy2tqdgiD35ADuEoaBSQMV588Sg3MnlfCOU5yp7S00sA CUYg== 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 j20si14911308ejs.76.2020.12.25.00.41.58; Fri, 25 Dec 2020 00:42:20 -0800 (PST) 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 S1727374AbgLYIlN (ORCPT + 99 others); Fri, 25 Dec 2020 03:41:13 -0500 Received: from smtp23.cstnet.cn ([159.226.251.23]:51856 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726023AbgLYIlM (ORCPT ); Fri, 25 Dec 2020 03:41:12 -0500 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-03 (Coremail) with SMTP id rQCowADXTPj9pOVfX+OnAA--.33235S2; Fri, 25 Dec 2020 16:38:21 +0800 (CST) From: Xu Wang To: mchehab@kernel.org, sakari.ailus@linux.intel.com, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] media: atomisp: Remove redundant NULL check Date: Fri, 25 Dec 2020 08:38:18 +0000 Message-Id: <20201225083818.64588-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: rQCowADXTPj9pOVfX+OnAA--.33235S2 X-Coremail-Antispam: 1UD129KBjvJXoW7ZF13uw1xuFW7KrW7Ww1kuFg_yoW8JFW3pa y8Z3W7G3yUXF1jyrsrXws7ZFW5AayftF1UKa4q93WfCw13t3WfZF1akF15JF1rtw45W3y5 Z3WrXrW3Ww1qyFDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkIb7Iv0xC_tr1lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVW8Jr0_Cr 1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY02Avz4vE14v_GFyl42xK 82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGw C20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48J MIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMI IF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvE x4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8ZZ23UUUUU== X-Originating-IP: [124.16.141.241] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiBgcBA10Te3q+NAAAsG Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c:159:4-10: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Xu Wang --- .../media/atomisp/pci/runtime/isp_param/src/isp_param.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c b/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c index e861777385a0..823ec54b6281 100644 --- a/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c +++ b/drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c @@ -155,8 +155,7 @@ ia_css_isp_param_destroy_isp_parameters( for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) { for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) { - if (mem_params->params[pclass][mem].address) - kvfree(mem_params->params[pclass][mem].address); + kvfree(mem_params->params[pclass][mem].address); if (css_params->params[pclass][mem].address) hmm_free(css_params->params[pclass][mem].address); mem_params->params[pclass][mem].address = NULL; -- 2.17.1