From patchwork Sun Mar 12 13:39:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 662641 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22393C6FD19 for ; Sun, 12 Mar 2023 13:40:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230430AbjCLNkW (ORCPT ); Sun, 12 Mar 2023 09:40:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbjCLNkV (ORCPT ); Sun, 12 Mar 2023 09:40:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D00E724BCD; Sun, 12 Mar 2023 06:40:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 82088B80B18; Sun, 12 Mar 2023 13:40:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D155DC433D2; Sun, 12 Mar 2023 13:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678628415; bh=ke7T1l0eRGRWmebXcI69qvnIV9XLz1cUDufT5C689es=; h=From:To:Cc:Subject:Date:From; b=heid8DOUEl48pfy/rKb5NLhK226OaqMoL/TmdUEE+uWdBXQVmGNsuwIIoYAkjv26t ZfXiLkUl2mq/+sYGdr+M68ObjtOwGvTNR0nZ7hx0Gta4axC/MrsOKg3C9LHG5+KC1Z IHreXPhgRhI25BoqRRWI73rF9AUJzN+po9YD71BjvVKc+wv9Db2ta6CJ3atQsc65hb uaMlhSTiRmHv3irn2ZoQfSn+2KI/98IHqMk323DMmwTI03rTdJuMA08xbw37Avb4c7 7lQllheSgMpt5fO589jeSKNq/0WgPnzzBRGJjGRK5eRogwOGfzWl7NP97jjbB1Xuyv 9zs1y8pfr2TAQ== From: Andi Shyti To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Brown , Andy Shevchenko , Andi Shyti Subject: [PATCH] spi: mpc5xxx-psc: Fix compile error Date: Sun, 12 Mar 2023 14:39:59 +0100 Message-Id: <20230312133959.256855-1-andi.shyti@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Commit 9e21720a4958 ("spi: mpc5xxx-psc: use devm_clk_get_enabled() for core clock") has made use of the devm_clk_get_enabled(), but it actually forgot to remove a couple of goto's, triggering the following compile error: drivers/spi/spi-mpc512x-psc.c: In function ‘mpc512x_psc_spi_of_probe’: drivers/spi/spi-mpc512x-psc.c:518:17: error: label ‘free_ipg_clock’ used but not defined 518 | goto free_ipg_clock; Replace those goto's with actual returns. Fixes: 9e21720a4958 ("spi: mpc5xxx-psc: use devm_clk_get_enabled() for core clock") Signed-off-by: Andi Shyti Cc: Andy Shevchenko --- drivers/spi/spi-mpc512x-psc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index 77a228f633d1..0b86f1804682 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c @@ -511,13 +511,9 @@ static int mpc512x_psc_spi_of_probe(struct platform_device *pdev) ret = mpc512x_psc_spi_port_config(master, mps); if (ret < 0) - goto free_ipg_clock; - - ret = devm_spi_register_master(dev, master); - if (ret < 0) - goto free_ipg_clock; + return ret; - return ret; + return devm_spi_register_master(dev, master); } static const struct of_device_id mpc512x_psc_spi_of_match[] = {