Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2648850ybb; Fri, 27 Mar 2020 09:30:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvEVhJQ1c8Z7Cq8PSh6ViqT8jqGu0ExZ1hpAupMfcGok211iVYsNTpQg6wgw+h/IrlOhHXu X-Received: by 2002:aca:f084:: with SMTP id o126mr4678069oih.81.1585326639383; Fri, 27 Mar 2020 09:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585326639; cv=none; d=google.com; s=arc-20160816; b=ytk43Lh4rRI93mnYfOFiMVZTCYHhnIF6kryzQ10lPqEk0oyWi+frPcTSSfqbP07Ean DLU6sFIjnF/RdPZZOVocJjqTiZzrmhk7svs2n0Fo2nQKiaAV3zW8X7004yrplx7jd9N0 zRvB3VkbgGEzJNPMOekr3NJdHew+O8WTX4CZ6e35uImNKUzPUs7xJj3yUqC8ThEW+jWN y9uCBEdtb/hENsL/pg+22+wckjrGVh8v2qyCmSDl1sp38JllZ9X7qOvUY5TQPcOi82xQ l+vMP8dGMrWQdvvluPqrnfJ8PHEDY/KnIPAwEZtrPQRu5Pa82LEVyqPLffuZTBPlInQ9 aTfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=si9xHtIZZDKUUhp2gziTm0dQ/DghVIx4/Nn9tFKnWLQ=; b=zbbTiupHOm2II3RNg9QN94JgcRyLOcjuyPJNsatiBoqDLBs4G3IvJqNJ7PeKXTYK0J ZpDDB9hr8vhanaE3HQoWT7uwzy1Beo4xkhu49MpTF+FMpSPTkEkXA9gqnIBQoumw9aqE 6vXFxCM49r6AVlj15vLibPUMeVIVBwanb+4jGvAzjs1NrRRyA9DM+8u9fLLosGCuxGbk Ys6SdF2Xy31lN+//E4xoKJ3+4ZIz+uRO8KNNRIDS4vjLIohmRF9YyXHLRe8Q0tM8r2Ii 8e2dFBABalDMjV5cfr3dX5fIUEnAVr1V8myFBimiYwi/3Q6p+LCApc6ijlBXA0VKQuAq VoHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmx.net header.s=badeba3b8450 header.b=VFK791c3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r184si2628673oig.35.2020.03.27.09.30.25; Fri, 27 Mar 2020 09:30:39 -0700 (PDT) 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=fail header.i=@gmx.net header.s=badeba3b8450 header.b=VFK791c3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727652AbgC0QaC (ORCPT + 99 others); Fri, 27 Mar 2020 12:30:02 -0400 Received: from mout.gmx.net ([212.227.15.18]:41461 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727560AbgC0QaC (ORCPT ); Fri, 27 Mar 2020 12:30:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1585326580; bh=1Em0LI/KVl1xxriM0SUJ9ct2bhqg2n0IpV9lkveMp00=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=VFK791c33sNkRSMGCC6CNnw4TjESkCF/FwFciz50fiUiWEs64KqatwrlDZHe+emQp rWNhqpucHDYR+D1pl8ySVMmJipSGdf9fIDSMZVSUOGmERFbpKWEA3ueQevXpV4nb84 ontBHXKtafBRP0og9+BsQvmsbehQNJlQWDObOTOY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.19.195.159]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1N7i8O-1jLuL343CU-014kxm; Fri, 27 Mar 2020 17:29:40 +0100 From: Alex Dewar Cc: alex.dewar@gmx.co.uk, Russell King , Enrico Weigelt , Allison Randal , Kate Stewart , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm: dma-mapping: Remove unneeded NULL checks Date: Fri, 27 Mar 2020 16:29:13 +0000 Message-Id: <20200327162914.24948-1-alex.dewar@gmx.co.uk> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Vflazi5to4WwXtKcR0FGBcrbXYZ36lA8poJ8iwEZ1rnQsK7j7s+ vIXToVShPwP07aJxDadCHyZ17J4FxImijCtv9DLX+5kelt88bP010UqQ+tgUfqY4D+VrHqI edxmB2JsfLaq4YGG+FFW2MzZ6NZwsKBBU/dEVynpi98lDdFQC653JBhMwkP+LbPWGnahLkd vQAb2/t/ANGz4Otdqi45Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:f09u4bQ98iM=:Y494TvphxhbHLCNgofeeX+ 1ZQxJ8nYdLhJBywlKG8jb6GRAVO6ZyGB+S+cp9/LFS5iCIyuXU8qlr3wMHr/c3YroRZPNXm2V DknnZTDhLb0uEt7Cc5w6Ko/ZoV6ZVvvC0l9KOWH0YBXGyAraQjTx3H/ov3yF/buELAGrboG9X hohBcPDICNMhzNBxXZC15AQlLrDa3fR8j4u/Adr/wJmu3Zyxk3wpzIoQM9cpEPB88ur32dBHy DY/99Nop+CHZuaqENdmmGHx+oJpuPPaN5IRHKgsFJTbDbp/Lbo0WHomEUdAv8fAyUaFaEamUX 8F/tgtE0QXSwjAVZ/ypSpveEVqR7I3LrOpdStLvahGaOYG8qK+6O+lorw1aECIvzYLtZjiBd8 fOSTSvleyEd1J8JaSmNDbbYo6ooRddqB206p9Lb6z5i3K/wEsoqZZdWt7B+fjNHjH983cc8kl xjibT3NKIgIUrEt2nUHsKayIgtADr904PNlUqe0HrnvUc06ZyQuqyCEGGuhmpwtmO2lDBgSvm huAy9LE2wAkfwGkNLYJhEPlZWIEmJhHWJzf1uU6n9TxAwV/7LZekvuUAaMZWZxhN0qcE6F76D GZeAgWmG48SYkvateeah8GNwmK0ZSBc2IMoICM8rC7WVZypFQhHeGHZqc5At+6N5BfKj0s2wf Y81XFC3s6kozQbEtNECuWWZ9Oh43nplPvK43h3faIIeSeHo1qi+V6Zknzy1BqrO4YjwsY6fOP 3Eb5JbtGYNn7b4pqPnE/86ojXYQ+5dhns8W0hZFHGzEuTdnzh41lMmtW4EBjNseO3eUtd36+7 cOZ/QN96cco9Q/G6AGiTEgYG8HYDFfenQ2RNAX15VeGXDP37GL1LB8/kjSZq0IOcd+muP8HZj ozgMVU1EFK5PxmsrO2Y3BixwA6B9HZ4RjYhU8gGHzez8ekxTCSm9r7WvEPgkyYD3d39ZTOL4y o/cpE6/qQfK2ZwcsWV9w2CESvlugL0sedgF+s2zMkm2PtWEfqO3SzAw5xiVaipO57J2sUWCjy m1Na9JCCikwA8F3rjS9oD+oYDzJPQ6fMOGDf+zoEP1JGZ7uejsbI54JqWmS6eiAbk+q0MYd/J qURvUgvRgd4inLTinChk+vhsFs2BI4liqzVbK8tVTQp8oSFxlEmglymz0VhqJpLcsp0kXsFFn H+b5MnjzP2LAL/b1S+w5gp86kYyCiWCbrnpQVu+hNj7+hOWikYUtqT2bP5IsoeCkq0MaE5BWT JTuqgtCMB1aqg4ouW To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dma_pool_destroy() already checks for NULL arguments, so the extra check is unnecessary. Signed-off-by: Alex Dewar =2D-- 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 f4b719bde763..a7c776cdc38f 100644 =2D-- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -560,10 +560,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 =3D=3D 0) =2D- 2.26.0