From patchwork Sun Mar 12 16:14:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 68402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp798994wrd; Sun, 12 Mar 2023 10:02:33 -0700 (PDT) X-Google-Smtp-Source: AK7set9hYLMDOS37IC3DUc/rGCaQjdtnd9QCty8y+wGlVdK9oD0YwKeD1i5em8k8K7H7w/2ihv3u X-Received: by 2002:a05:6a20:7f8c:b0:d0:360c:eaa9 with SMTP id d12-20020a056a207f8c00b000d0360ceaa9mr25531400pzj.62.1678640553336; Sun, 12 Mar 2023 10:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678640553; cv=none; d=google.com; s=arc-20160816; b=V83i8TXUtqYXeydSYQCr1QOLnt6uW+e1BtFdMLPXd6LayD63LpM83/4RdTrbkkjHcn UgFF5OILun2CWORNZYJ6WQeUbK5FuvyQECEho5YalYRrhcGig8zYm8NQulMEDhe9Wb2V OsPiaeDCqJGZXI7b1wLxoIBUBEIw2VSOziGDmZ5Z7Z2TtoOtP2UvqixD9iuFnvpf0hHY Vl9smp8A/tfp6ZBfsKSM9Ge3yg2ml2JGP6j0sLjO+GzJz00oASVB7efRtgI9fFjVCVqG vCFlQ9R2brdoIxyjgGzztpvC5ykEvK/7+syzPd7ZS58ur7Ejyqj+TWOk6d73O/lRGwCU K3Qw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jaoAeR4ZesgPullzHDsFT+Gsno+N9yQZiypT9/sW+0s=; b=Qa7y50WUdxZA9GXQGFFWcay9kdTtiUaMYrzVewJj5YJg2CXKnjcmkiekB/poCjLgMY gL6InVx7MDM1+gpqs0A3T7oeA2cnBTfXa52Vl1ILT7MsIKkZtPp0HTfICEkIN2De/3W6 OjjXb6lpyBx8rM3UkSSUJJicSfTsQR6/82Ns+GOg687kq+8AlJh0aRDe/PL475g5T/lS IMWDtSmFwevGFS1Di6LeCHHlNyrd9bL25fgAJcZBgamPV2faKrIm1aRhW1iPjvVs0faE h1jIkbBYIJhd5q8CuTgz76WlfIW2Lt+YK+88orYZt5mmRdLXp/BgudnNun5ZUxCAuTvj xZPw== 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-20020a63e90e000000b00502d7cd012csi4570157pgh.378.2023.03.12.10.02.20; Sun, 12 Mar 2023 10:02:33 -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 S230341AbjCLQQF (ORCPT + 99 others); Sun, 12 Mar 2023 12:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjCLQP2 (ORCPT ); Sun, 12 Mar 2023 12:15:28 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E38134C05 for ; Sun, 12 Mar 2023 09:15:27 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbOLw-0007ns-M1; Sun, 12 Mar 2023 17:15:20 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pbOLw-003f1i-13; Sun, 12 Mar 2023 17:15:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbOLu-004K8B-Nd; Sun, 12 Mar 2023 17:15:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Michal Simek Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/30] clk: xilinx: Drop if block with always false condition Date: Sun, 12 Mar 2023 17:14:45 +0100 Message-Id: <20230312161512.2715500-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> References: <20230312161512.2715500-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=932; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=2l2y8Hwodd04VIsYFpyJCISjEEwoZDOvzxOqN6nZXvo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDfod91tRBqw4DTMu5AWaEo9bEyJsVu3RB1JsZ RWLXfZAPzqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA36HQAKCRDB/BR4rcrs CYLQB/kBUyFOTio3WkuzOw5MVnPnA08KyRaoE2EbydF8Q8XsArHNbkcU3FJ5xcKZrp6Zzp5GEWX mQfdDhOSXU0ZZTqxHdyVTxnuGbylhwOzJ/AEdxk61lIv24FRljrXwxuagRKBDYflJ4bcWMrJQ7+ tNjWDsO/yeGt5ocCPxd0ooStsRxYsp5vkEH7u8kYHivIcjoB62r7xnBb0QhgblXy8Z0jErrNM6D RayhTythzWRkOXOT3Df75a/qJOSp8Wwrds9XHFeaxeFnxx42MUoISeaMO3jD5yMxMPPLfp9L1+0 iTLKlXFHqZx1/iUjGMhh+bapytf0MENIF530tsPU0uFPZr1Q X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760182196584305591?= X-GMAIL-MSGID: =?utf-8?q?1760182196584305591?= xvcu_remove() is only called for a device after after xvcu_probe() completed successfully. In that case dev_set_drvdata() was called for that device with a non-NULL parameter, so platform_get_drvdata() won't return NULL and the if condition is never true. Drop the if, preparing a conversion to make platform driver's remove callback return void. Signed-off-by: Uwe Kleine-König --- drivers/clk/xilinx/xlnx_vcu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c index d66b1315114e..54b44debfd3e 100644 --- a/drivers/clk/xilinx/xlnx_vcu.c +++ b/drivers/clk/xilinx/xlnx_vcu.c @@ -707,8 +707,6 @@ static int xvcu_remove(struct platform_device *pdev) struct xvcu_device *xvcu; xvcu = platform_get_drvdata(pdev); - if (!xvcu) - return -ENODEV; xvcu_unregister_clock_provider(xvcu);