From patchwork Thu Aug 24 13:09:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 136843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:9d9b:b0:139:fa0d:b2d with SMTP id d27csp169948rwo; Thu, 24 Aug 2023 08:05:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2EQnBdpS/vWxVmMt3/qJTH+lNTnFy45EaB+Vv1pINzQuyiMM6hI74NiClwTwACxGz1Cix X-Received: by 2002:a17:90b:4a88:b0:26d:3458:7a61 with SMTP id lp8-20020a17090b4a8800b0026d34587a61mr12821565pjb.5.1692889555184; Thu, 24 Aug 2023 08:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692889555; cv=none; d=google.com; s=arc-20160816; b=nvITX+2d/1Xs6u7ciwl/Cx326Lw7WkY7DppW6QV5RQFnYCDsQ3m8DhneWa9QYnFpXr m2Qcd68HvT6m+uy7fu9mICyvC/N170pYFrWYRbw0/dfFAOTZAdrVvfZcXZdi5XxWiTjx wRaTbKLuu3gMbbfqAp2G7ge9l+iQYULwYTg34srxVAB4uOtp50dtc4X9a+bYyyfTe6qI QV5QusghjgOe4ImwnuHw6L0d9XGbFURZKEEjMBLEb0iatw06qBo5Fzkd21HJ4oLJ2Nrt 3Tnxl6SnkK6QiqMhOxqEIcVvPg2EL/vPP22ypeQYuACNgzLQClp0V8IuK0fn8vA6XYw0 VGWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=P4XtuswCj5NJ4ljKORmSqie4pBZOU6uSzYQ3SfzIBS0=; fh=P8b/2GJouQ6h23L7+9p84mIKUw6vIjlEHiHSaErBGvA=; b=tNR3eO5WRaXY5VLKBMqaqoNkB/p4hxr1PxFVSBlChT7n4JQWi2eKGMnek6LWg4qhg8 4OKpaF/wIkdsy2atwAW5Rsog3vQJlfXslFcTOUMUO8Y4mwX+7AmudoeQrqM4c6baWscA 8JVKIW03rgqmFVwWhoIM+FFzy1Z4515m5Co37RQCd2p9zbz7ua5K3OE7uYVUfQlnbduA JdaeQPfNb1t+Yf3RvzqEHw/mBM/AVUAFEK93WXgg5AKIbqCA5G71NgUNoJ9KazTZu+Z8 i9uzqrLjiGoFjfF0mOMEIeoIjKBFOrvFl2JNLyeZHIaCm5EhGhKMfE5cybpBFGlVDAUT aQFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020a17090acf8e00b0026b3842b062si1472462pju.0.2023.08.24.08.05.31; Thu, 24 Aug 2023 08:05:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240313AbjHXNKc (ORCPT + 99 others); Thu, 24 Aug 2023 09:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236755AbjHXNKS (ORCPT ); Thu, 24 Aug 2023 09:10:18 -0400 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AC121987; Thu, 24 Aug 2023 06:10:16 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 641B71866664; Thu, 24 Aug 2023 16:10:12 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fThewjPZHioT; Thu, 24 Aug 2023 16:10:12 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 17BC31867F66; Thu, 24 Aug 2023 16:10:12 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uK8xMjecZl51; Thu, 24 Aug 2023 16:10:12 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.233.235]) by mail.astralinux.ru (Postfix) with ESMTPSA id D2124186765A; Thu, 24 Aug 2023 16:10:10 +0300 (MSK) From: Alexandra Diupina To: Joerg Roedel , stable@vger.kernel.org, Greg Kroah-Hartman Cc: Alexandra Diupina , Will Deacon , Matthias Brugger , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [PATCH 5.10] iommu/mediatek: remove redundant comparison Date: Thu, 24 Aug 2023 16:09:54 +0300 Message-Id: <20230824130954.29688-1-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775123358376708679 X-GMAIL-MSGID: 1775123358376708679 iommu_device_register always returns 0 in 4.11-5.12, so we need to remove redundant comparison with 0 Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b16c0170b53c ("iommu/mediatek: Make use of iommu_device_register interface") Signed-off-by: Alexandra Diupina --- drivers/iommu/mtk_iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 051815c9d2bb..208c47218b75 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -748,9 +748,7 @@ static int mtk_iommu_probe(struct platform_device *pdev) iommu_device_set_ops(&data->iommu, &mtk_iommu_ops); iommu_device_set_fwnode(&data->iommu, &pdev->dev.of_node->fwnode); - ret = iommu_device_register(&data->iommu); - if (ret) - return ret; + iommu_device_register(&data->iommu); spin_lock_init(&data->tlb_lock); list_add_tail(&data->list, &m4ulist);