Received: by 10.223.164.202 with SMTP id h10csp293301wrb; Wed, 22 Nov 2017 07:18:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMZvbTKoVRKGDd9EE8nF43VZg9+ZhTaP0PEgq3tKdDA5OIZm4L05NNoL//d8qNRnTP60mALf X-Received: by 10.99.65.131 with SMTP id o125mr20582486pga.83.1511363923229; Wed, 22 Nov 2017 07:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511363923; cv=none; d=google.com; s=arc-20160816; b=s0wjVl0drugmNMwy6FQTUkSrrXHO/NseqFB4joxFPTbDAFRROzEUcB8y+IJ4+dsWdW ipaYmI4C/mfGkOtuZz9LJthjv2VatHy6yzJPVTclajApgtBaSS/yRjGQAADVELNhnWjL xTaoA7d4zQttYXXeIF9OmZjAptE1PmgUL4OJ6LN6XUS1LWJECVH1Sjn9PZFTIW0XV4Qy ask7zT/Id0gOEljorak6ssU63zMJot25d2paOMdO0XyANuHg0/HMXVho2QDgB+JQ1yac pUYJIFuYW3a6V5u0Z/tsW4TxTKfkLil5vRJmfMHQB0N3kEdrErN/BzAJ9DOyxnTSct/n DHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=SNs4gP9MWGtV5sbETze5Eiies+yBjIzB7au0tyzBQVg=; b=IO3xu6/KpMEj9KjkHMbHdJ/girMuLK11+Ah1uKD5WOohww3EPnHJ81wrDE5Zmwffqu I01ddFMDCDa2T9WWHDL9Usq1xucECgDqWz+7fPPmQexST//us21tk8X5SmOZXRxegSzp ZKHq9Oyb2r5vFV+KKj71nKH14cy82Ps4GvKlZafZhUXPBQ8g101XF2dOrFgzQ/l5iEVL Fx5sf73yWO3tthA3YJ6uQVQLpn9hNCHTju5yedQsQ3TS/PQhepOV/ZJiUiPpYAek28Zm VJAwLDJSHZK1Ikj3yNLpu+bc6K+80PczNkeFVYAhQTj0+D0/XC8eTB1IpGcM+C8KFk7Q 9+gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kIVafpks; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10si13512353plp.112.2017.11.22.07.18.31; Wed, 22 Nov 2017 07:18:43 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kIVafpks; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751686AbdKVPRg (ORCPT + 77 others); Wed, 22 Nov 2017 10:17:36 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34111 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbdKVPRe (ORCPT ); Wed, 22 Nov 2017 10:17:34 -0500 Received: by mail-lf0-f66.google.com with SMTP id i14so18662904lfc.1 for ; Wed, 22 Nov 2017 07:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SNs4gP9MWGtV5sbETze5Eiies+yBjIzB7au0tyzBQVg=; b=kIVafpks/7nICJKmjWf4GTtMQhdPsETR8JynQbpIcA01ncUKGFkcAZ56qvE3JwMH2f bv9HwPM8fUc6WVMoWA2y6cIKE49EpbHNSVDURvivDYtF1CvLe3gtc0mRbjwwk+iqq8Tv nFyV+Seu4D1eXuhwivv+I3kHxtwuAfTlMKq4YYGKANhBb/wVgXu1PrHtacgR5E4b/+F6 7RtCkCa9f/OUTF9YEy0rw5OXamJdoIP3EnfEEQn7iZBtzyCVZLV5j3M44eLR/Z3BEiQf V4+dwFUq8CiT7ZPZ8I7r/jaAOZkgjAPS0jNs8eCoF8Q/992dMA0aPSlKO3Teb0uGTwyq Z11Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SNs4gP9MWGtV5sbETze5Eiies+yBjIzB7au0tyzBQVg=; b=ZWZeAJRz5OKuiFYvdi1fNdBxMLKegdcZ4c2HzzeMvuMc72+iqGeCi1lf/ZLv5u0yTC ynxlzua9Y7rDclDqfBycDKWohaGmhB9SsMRgeGw0kNBvz/vwmlNT39PNrDYAq4S7olUu lgNaa8XZHOYRgmDclgLzBGA978Cq+XCLxDn1ooABbSXyJKu/+Rz8yenT03TImaNXYC8e 9NHe41DF6xV5Kn+XnCo6FFBDGiJPA4F3Jpr95FrB7Q+jvyShEXhCtXWEGFV++jYN2a4R siAFBdkrmbnyfxb1T5KR4wSXAprJHtbAVAG9wfB9NzHDYbS6S9SdPgWTRlY9kkBg95ix VH1w== X-Gm-Message-State: AJaThX7toq33Sc6l5WZhwDlsfW5YQEZ7jODlszbrMEGdDuSsggWditYS Jbq0VNmg1ywgRPlH4CwHj9A= X-Received: by 10.46.25.209 with SMTP id 78mr7691093ljz.122.1511363853326; Wed, 22 Nov 2017 07:17:33 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id d1sm3690563ljf.66.2017.11.22.07.17.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Nov 2017 07:17:32 -0800 (PST) From: Vasyl Gomonovych To: linux@armlinux.org.uk, alexander.h.duyck@intel.com, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] ARM: dma-mapping:Fix ifnullfree.cocci warnings Date: Wed, 22 Nov 2017 16:17:23 +0100 Message-Id: <1511363843-26202-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NULL check before some freeing functions is not needed. arch/arm/common/dmabounce.c:573:2-18: WARNING: NULL check before freeing functions like kfree arch/arm/common/dmabounce.c:575:2-18: WARNING: NULL check before freeing functions like kfree Generated by: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Vasyl Gomonovych --- arch/arm/common/dmabounce.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 9a92de63426f..dcdd80c7a543 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -569,10 +569,8 @@ void dmabounce_unregister_dev(struct device *dev) BUG(); } - if (device_info->small.pool) - dma_pool_destroy(device_info->small.pool); - if (device_info->large.pool) - dma_pool_destroy(device_info->large.pool); + dma_pool_destroy(device_info->small.pool); + dma_pool_destroy(device_info->large.pool); #ifdef STATS if (device_info->attr_res == 0) -- 1.9.1 From 1584733744870498922@xxx Wed Nov 22 03:04:30 +0000 2017 X-GM-THRID: 1584732623319555253 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread