Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3891716pxf; Mon, 22 Mar 2021 19:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA5DpBpALEsJRP7gPos1dWNq4qKlbEfThV53e1oaOwKznvlNKpn+CceVhpHprZa7XLYkmP X-Received: by 2002:a17:906:c102:: with SMTP id do2mr2531914ejc.305.1616465057454; Mon, 22 Mar 2021 19:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616465057; cv=none; d=google.com; s=arc-20160816; b=n6fACdYiVLlJJelsPGwqZ1Hvt8X9EJdmZYMexNysRSxxInvTaKnhRRn+5zjcSjDyCV 8MgXW8LtWEZX5sEVHMri+EDl7AxwLHpfOp1SCFHRZR/xbGz09JEWeWukZd9XNOia3I5f OyvDgxwKJo5REI6zdrIpuDu22KlybBbs2gikQq0j+XIkjxRnovkL+R9j9/rL7Bp4j6w/ RCdcPsecddBn72fuiGwqsb0koHyMASUgMe7jrr1yWudcnh2+HHfx7DKBZ5JLDQ09HoAh aeEBMy5pmTTsMVmKagV7M456U3S8u+qJz4XxegzpOAM15aoAL1Y6KalZsFvKDvVdZprZ 79hA== 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=chU96+l/yIiX6IvZrIGF3f/f6Ga3ezQ/3h6LqRNfwO4=; b=srOSaa06MueML/gPOJnks2PZrP8QjdJsfIOxXV6T21Tosyit9ZfAlQubbgkXeU9Ibv mYwvrpn1NcF62e34Y9Ht9q0zUipPnWUleXF9nvw9/WSjyem9uqVN1lu78zxe4/UFtsxs 0LWw7IfRk2ggeESCW1Lmqgflw1A8S81TmPbKZPR9IKCHgP102IW4PbBkQyc8rH705dTh 4+13Rp4DVitcWenZG+P1ljfGgxHpM0r0Eyr6nIiRxpWusTObYXY4npo3OI1e72se3Ndz yr4pLHEfg+aLc+k8jvx8BOi4NkBJYu9qx/C3DjyU/Uxq09sBsKbbxRRS12CYvTzBJGwa RdWg== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb2si13484096ejc.547.2021.03.22.19.03.55; Mon, 22 Mar 2021 19:04:17 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229979AbhCWCDA (ORCPT + 99 others); Mon, 22 Mar 2021 22:03:00 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:38533 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229467AbhCWCCn (ORCPT ); Mon, 22 Mar 2021 22:02:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R851e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UT0bCyD_1616464951; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UT0bCyD_1616464951) by smtp.aliyun-inc.com(127.0.0.1); Tue, 23 Mar 2021 10:02:40 +0800 From: Jiapeng Chong To: mchehab@kernel.org Cc: sakari.ailus@linux.intel.com, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] media: staging: media: Remove redundant NULL check Date: Tue, 23 Mar 2021 10:02:30 +0800 Message-Id: <1616464950-61009-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4269:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 592ea99..d818eaa 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -4626,8 +4626,7 @@ int atomisp_fixed_pattern(struct atomisp_sub_device *asd, int flag, err: if (ret && res) ia_css_frame_free(res); - if (tmp_buf) - vfree(tmp_buf); + vfree(tmp_buf); if (ret == 0) *result = res; return ret; -- 1.8.3.1