From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB080C6FD18 for ; Tue, 28 Mar 2023 13:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G9JPpKgf5YOwphQPxe4+DZMxMItRQmU2nQkvLCR2uOo=; b=0hoUVJK/Dk6fDV ybqKHT6ej90RfzozPrsvtzeVWDZ88JOouTcpWNOp22T5k03c3Hfa/FRQZgbakJGW+nZEhWzZzwG/L WG1vdjcIGP9rguG7q0+k/JyPVWpJBksAZa7T2F20959pHSeZUD/1rzPS3gNWuthC6P6+2KyJX4l0a OkyhehnTByJt5+tOaUihnlN9nOueerXjk7NTIcuwj8Pq9MSFJD61pVO6YBjwNubHI3+PGCvy1VyzD AJN3jQZFpk+I4QJh//MgEZ3621J6UjS3snzuPciVeYxPoFWMc3N8Fmh8POpS6zcCinYY+zoxu/eyE KU1FnKBBP/RH0sFM+89A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph9am-00Edpa-0A; Tue, 28 Mar 2023 13:42:28 +0000 Received: from mail.8bytes.org ([85.214.250.239]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph9ai-00Ednh-0E for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 13:42:25 +0000 Received: from 8bytes.org (p200300c27714bc0086ad4f9d2505dd0d.dip0.t-ipconnect.de [IPv6:2003:c2:7714:bc00:86ad:4f9d:2505:dd0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.8bytes.org (Postfix) with ESMTPSA id 88A31243A61; Tue, 28 Mar 2023 15:42:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=8bytes.org; s=default; t=1680010942; bh=GInBziKvtEogBV1elNmgxf142ivXpDC0HtkgqB8iyuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=soO+PB/HbalbOwJ4qmES6cmHSZT9LGYy0TkPprp/o2qXYJNV4/P/W+fLbqC4m2glB 73WN06/Wx0eIf3Zn3W98rV437FLs/xBAWj9Y+Y5sMYWLMxRbGB/9JmB7REvitEZNaC wbzx8Hdxl9q4lK8tkzXEbZkNw3GFpTWdUbN2ylh0aSd67Wts6gfLid1cDpfoRBquhi XRDtk/+49gYfij/i9fcqZrwdPT+jANOdjUFzW9SBiX508DMrRc0D4b1t2oeXRM5h9G ukpvJmu65iYfxr17Dk03H4byw/ucBO0bINM5HIrHNd7IXijh0swKr5Nai1bVQSlmBH EqSaTZaKsOnFw== Date: Tue, 28 Mar 2023 15:42:21 +0200 From: Joerg Roedel To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Will Deacon , Lu Baolu , Vladimir Oltean , Sai Prakash Ranjan , Jon Nettleton , Robin Murphy , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 01/10] iommu/arm-smmu: Drop if with an always false condition Message-ID: References: <20230321084125.337021-1-u.kleine-koenig@pengutronix.de> <20230321084125.337021-2-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230321084125.337021-2-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230328_064224_335558_13F49E54 X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 21, 2023 at 09:41:16AM +0100, Uwe Kleine-K=F6nig wrote: > The remove and shutdown callback are only called after probe completed > successfully. In this case platform_set_drvdata() was called with a > non-NULL argument and so smmu is never NULL. Other functions in this > driver also don't check for smmu being non-NULL before using it. > = > Also note that returning an error code from a remove callback doesn't > result in the device staying bound. It's still removed and devm allocated > resources are freed (among others *smmu and the register mapping). So > after an early exit to iommu device stayed around and using it probably > oopses. > = > Signed-off-by: Uwe Kleine-K=F6nig > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 6 ------ > 1 file changed, 6 deletions(-) Need an ack or review by either Will or Robin on this patch. Regards, Joerg _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel