Message ID | 1511363843-26202-1-git-send-email-gomonovych@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A68660595 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 22 Nov 2017 15:18:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CC3C29CF0 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 22 Nov 2017 15:18:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6139029CF5; Wed, 22 Nov 2017 15:18:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F215629CF0 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 22 Nov 2017 15:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=d4MppDb4pOkWMJu2KyXlFXvQjy73quNT40FkgPBSmLA=; b=RaM LYDhqafO7/TVyFsAJDx7FsDnHqldR1qyz3SxxYeTePRIdjK2kGbJ6oiraxYtLZOG19z6346dX6Spf uE1CY2fSS41vkCLM6gpZCIbynPuhV4SwNBDAQUnVSXBGCMB59cwAicvRvwkRN4MwBqCCi7uD4+4Nd pvRndYJM0HxGae3Pmp3OYa29PXyCj136NlAEk03IBy/p5gpRJQ1J5Y/nd4oJFTlc8IbUXtejEpkvx 1otxmaTHmBpaLAshyygnz/jfwGuwNtbL7qtBdlLG6yXb4oi7TAcgTIa4pn9Ttq8vB4KKE9O1fI3wz RY1q4vK8ftFdmYGm/uidCwP6w/vmJjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eHWmq-0002Jy-8p; Wed, 22 Nov 2017 15:18:04 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eHWmi-0002CA-C6 for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2017 15:18:02 +0000 Received: by mail-lf0-x244.google.com with SMTP id d10so7591905lfj.7 for <linux-arm-kernel@lists.infradead.org>; Wed, 22 Nov 2017 07:17:35 -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=JKx0YN/ZD4fMwY5vZLuq+KkAnMj/7P0YQjfJZmZ8FQWTgi2JnoTmhdICd46k7rqqkV yMmuYM0g0Pz0C7xLTpe8J6Dm44ueFw3e1a2uZQaxP5sbwBx7gsTfNMF5PzEFW4VqagnQ 3xomi58boKF6gbWTXPDtdRJF3ASZ/ZiVfjF4RFMnpTGeYAQRofL6HlRjIpcX0AL/kVts fLdwXTrQfLHVKc3Mz7HcGZ07xmwQd58ZlvkiEW9CZV+LQ2P3GEGA0cPNkFtBj/BVu/ZO 9HysT4FMvR5EQ/EW+Whd9xUyroZEAPO0Ncnymx609Qv08YDW6FauC9tO/x3+TZOZHq25 XqZA== X-Gm-Message-State: AJaThX7JB/qfUJ019EY6Ilhb1n3+TRFAdYog7sD1stt4qym59SjPqQUX /5d9Ul5EA+UqAiVZV8UhXS5EMFtT X-Google-Smtp-Source: AGs4zMYs3rSanfy+FEWBRYr9K+Sh1aqvXxpKCU3WcNcupYD6nJEKP9rn0W7+DPpNxsZ3GtMJbMxWlQ== 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 <gomonovych@gmail.com> To: linux@armlinux.org.uk, alexander.h.duyck@intel.com, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171122_071756_637545_AEB65FD2 X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: gomonovych@gmail.com, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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)
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 <gomonovych@gmail.com> --- arch/arm/common/dmabounce.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)