From patchwork Thu Aug 15 11:25:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13764688 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 6DC30C52D7C for ; Thu, 15 Aug 2024 11:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=qswmFLJc+rRJnvMK5o1RhUuE0PL9fCewlpe2LTSF+JQ=; b=NiGtIxkMCyM5OF8XNh9upToEil n12vRhaJQasZvAmZY+/Y438OUE+5DyxBUNisTWh2yzJyXt4Fg2vpH6PKcwcuItETc1CPCbwNCKOhu pAgbzt0QIIYJjGYEr/PAvAldw4wzuuRo5wZHUNcNTrQR765rl3gK82FMi1l3EfbW9EqJfdFbiG26A 1NYP9Kc34VmfAe5PIfYqzHz93EZJIYUUh/G4wlgKY+P7Hhtp8TYIvEXFMkr481QZO7GEQ+Fd1dTT+ T12gsoMWE+t/tb6b5Gc3HKXIEXGzmfmms/pCawWQk21yAGeTUxLoDAG4bIEDaYe98nJOEakMG2AZ3 kQcPtrfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seYcd-00000009mK2-0Mxz; Thu, 15 Aug 2024 11:26:27 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seYba-00000009m8U-22QX for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2024 11:25:23 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a7d26c2297eso105229766b.2 for ; Thu, 15 Aug 2024 04:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723721121; x=1724325921; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=qswmFLJc+rRJnvMK5o1RhUuE0PL9fCewlpe2LTSF+JQ=; b=tPSWDgx9pptiQAXhkX8QPTTelZBVeIw0cCHtBATMapToYrIaa8sjkVj9Y/+ilPY760 r3wp+Dqld3Af87VneFCUiLdLpUDVvVSpIOdk5VSw0H+8Elk8SIbLeyP2cFzZj8KId8rJ mYxBlBbqa0TZDwEUni89Q9A5iwS3/YYbF2nhG6DeP9OCBSszT0JmpvYVW16XUlUPm3XE G2OPNtfVHcuqAUgJfc4dnpudaCdp/h5Xzf6HFtJ6iWCvupoiBHa001fXz6SOKs/rK7se jrSEUj/rOjD0c9E2Ey9YwppW9QngoLPiIk4DrzGxkeZV83NsaUuRZjBe5hwWjHD6geTx frww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723721121; x=1724325921; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qswmFLJc+rRJnvMK5o1RhUuE0PL9fCewlpe2LTSF+JQ=; b=sEWEn18qOb8p2GBg5HnODIxZIQaPhfSGIbDpiQfhETqz0AvtrJf6/eO5cRwHIy10sj 7Mk+XGm92080f2h+YtkcozDMkuI3h7m9UsxARfUnAONZU6+hDqeItgDeEOAW5/r37Yli 0AgB+LS+hjghl30hndlNu2wJUM+ldp+b9r5LQmJAckAAD7F6HNCdARNll1VPXBwX92ig 07oRwnZ1rYVrZHOWVbw8QNkmRHQPZdDP7rwR/xj7O11jv9G+HUfLvFYIOfKF8GvLLD4x wg/4fCkG/xhsm1Zc3zdb8r8OyCmRrYFAOE43NhEsQHtq6ElQuzMDhE5L12E9tOiA7NQd 3msw== X-Forwarded-Encrypted: i=1; AJvYcCXfHKR9h/xrSi4qSbO+tdnQbaonCT6vqSXvl32q7x9JuYr/at2QpeL1lImPAI/X4iS0pT7yJUrIRgEugszzb6rYFI+6xbGo4eEnelgK7rnIRy5MbNQ= X-Gm-Message-State: AOJu0YylHtaZd7jja0ZECbUrYjejXwYUmfIufLfRWGiDDF5fvs6naaCo BGfLKl2OlD3Vd8XwySzOpQfLZTp2u+II8MnTcEJsv79oVmSuxZLq4/IxIldML1g= X-Google-Smtp-Source: AGHT+IE04IYzhOFDEe/StHeMv+I9KreAuEIMLJabn0MgWVsiJJeJsCqyh9XE5pP5z25EACFGgtwnLA== X-Received: by 2002:a17:907:f1d4:b0:a77:e1fb:7de9 with SMTP id a640c23a62f3a-a8366c0f0e2mr501782366b.5.1723721120636; Thu, 15 Aug 2024 04:25:20 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a838396ce0asm85941166b.206.2024.08.15.04.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 04:25:20 -0700 (PDT) Date: Thu, 15 Aug 2024 14:25:08 +0300 From: Dan Carpenter To: Richard Zhu Cc: Damien Le Moal , Niklas Cassel , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Frank Li , linux-ide@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] ata: ahci_imx: Fix error code in probe() Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240815_042522_553578_AE4C70FD X-CRM114-Status: GOOD ( 12.10 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Return a negative error code if devm_clk_get() fails. Don't return success. Fixes: 3156e1b2c071 ("ata: ahci_imx: AHB clock rate setting is not required on i.MX8QM AHCI SATA") Signed-off-by: Dan Carpenter --- drivers/ata/ahci_imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index 65f98e8fdf07..6f955e9105e8 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c @@ -963,6 +963,7 @@ static int imx_ahci_probe(struct platform_device *pdev) imxpriv->ahb_clk = devm_clk_get(dev, "ahb"); if (IS_ERR(imxpriv->ahb_clk)) { dev_err(dev, "Failed to get ahb clock\n"); + ret = PTR_ERR(imxpriv->ahb_clk); goto disable_sata; } reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000;