From patchwork Mon Oct 2 07:01:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13405593 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 BD0E8E7849A for ; Mon, 2 Oct 2023 07:02:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbjJBHCB (ORCPT ); Mon, 2 Oct 2023 03:02:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235616AbjJBHCB (ORCPT ); Mon, 2 Oct 2023 03:02:01 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81B7AA4 for ; Mon, 2 Oct 2023 00:01:57 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4064876e8b8so60959605e9.0 for ; Mon, 02 Oct 2023 00:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696230116; x=1696834916; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=To5Z1ek1ng/bcrw4gcWQYfPUL1tJalZo399lDaaqlbk=; b=gjh37sAPabYEUrw8HCwH0189hKj07WBRiWaMzSlsgk+A9vIdWk0xfBx/nUCZqG8WXi mJcugLbICX5RPDpfUuRZp66oCbJUB1BQZaOFFLG4fyAl5fkZhNl1So6h5L9p7wMpiAMO a7pbs/v1+fbPTHCjU8ZCgWNCcI1WW/TnhE9xCuWQpZ544Qe794c3+ga6JQoYN71IfQBF KmWcrFuOwXa+05H3HT+lBc9XxHHrd7txiD0n0NyNtPmFosj/+CCxgHbbFPKVC4h87gHc fCr6bwzHEZxEf3JTQoPfQssL6mpE7xmBiRMSgXy3GzB/cnN7JloqH4mnsEubB+wAasgr eOYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696230116; x=1696834916; 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=To5Z1ek1ng/bcrw4gcWQYfPUL1tJalZo399lDaaqlbk=; b=HhX2HwGVM6lCz9Tts7fLNa99oHI2kPq9Z0KHB/rcfkx53tcDJSbAM5RtR42iXCtIBM q69ZVd2vwsnR5gYSuYfRlOkwG2X1ejUR79HP2gQPNQxxv/TY0zAuWku4ZDi0oB4CGeoH oRjtq9pYaDleRXWUc/Mr0sedyqDWQHCq3VLZMWO/PSLHGjdXPEPTeOsFTTNJtoQEdwxJ /7LQ+tLBKDrtXwrbMt0GW4n/l8tALebPTrUXTWDS1rn41fRZdM/HbcpRp6teeVnJVoY/ VzMyBRXGbakfnnVQyqSA6Yzhy8tJ5+pJc/B4BDbLx27oCFlKeXysnHeZaQ2Bxjh/+lKg 1fkw== X-Gm-Message-State: AOJu0YzdY8ktfy3mKHnFN6lYBMI5Zm0M5erBlemHj+32ZYmVDY4Jt0bB 91dI09tHfBbE6upDZed8PucYVULTFie/RucxiWA= X-Google-Smtp-Source: AGHT+IFUaESPnID8Bx8Iq2U2O1ScDfATW117K0k6Diplm+aeOUbawH1TDpLk+t5XmonRkAxYLh2RTw== X-Received: by 2002:a7b:ce8b:0:b0:402:98cd:a3e9 with SMTP id q11-20020a7bce8b000000b0040298cda3e9mr9220533wmj.32.1696230115893; Mon, 02 Oct 2023 00:01:55 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id v3-20020a05600c214300b004063ea92492sm6595641wml.22.2023.10.02.00.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 00:01:55 -0700 (PDT) Date: Mon, 2 Oct 2023 10:01:51 +0300 From: Dan Carpenter To: Shengjiu Wang Cc: Abel Vesa , Peng Fan , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH 1/2] clk: imx: imx8: Fix an IS_ERR() vs NULL check in clk_imx_acm_attach_pm_domains() Message-ID: <44bacaba-848b-4e62-908c-16538330d4dd@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The device_link_add() function returns NULL on error. It doesn't return error pointers. Fix the check accordingly. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Signed-off-by: Dan Carpenter Reviewed-by: Peng Fan Reviewed-by: Abel Vesa --- drivers/clk/imx/clk-imx8-acm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 1e82f72b75c6..83019b986622 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -287,9 +287,9 @@ static int clk_imx_acm_attach_pm_domains(struct device *dev, DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); - if (IS_ERR(dev_pm->pd_dev_link[i])) { + if (!dev_pm->pd_dev_link[i]) { dev_pm_domain_detach(dev_pm->pd_dev[i], false); - ret = PTR_ERR(dev_pm->pd_dev_link[i]); + ret = -EINVAL; goto detach_pm; } } From patchwork Mon Oct 2 07:03:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13405594 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 D74C2E784A4 for ; Mon, 2 Oct 2023 07:03:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235620AbjJBHDR (ORCPT ); Mon, 2 Oct 2023 03:03:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235690AbjJBHDP (ORCPT ); Mon, 2 Oct 2023 03:03:15 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D99E10C for ; Mon, 2 Oct 2023 00:03:10 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4054f790190so153395495e9.2 for ; Mon, 02 Oct 2023 00:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696230189; x=1696834989; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8xam3PZVeEtEQPfmOLn7BWSBTDM+HLGUGDwJNItVyho=; b=u5TYZ0LML/BHbbUO6ZE8ywCKS+bO6q05F7c/5FxThqpm8FhB4hPosnXNY9BnVoo/43 0PFrjY9hlaivK8J/qDvWj7tIo83hAYbJPQyBWpYAKI6xZ7NcZ/ZyvZo/LG4fsDUDK40E DviiDfcPlkvBmpgTF8VyLnbXv0c3z9a3p4j+mmM1BVENrk4aMMo99BJJesCxf/pHVcWG Bytpy6hLrV46l5rHbyTbuTtr+bynREab8Qt5/KZlqy+3lGD1wGOVHjJVcD8VpGl3ztSU oYC/V6LRaCQs3ZcnhU6Hfp3QxFrgibTEZWiZzfF9Du+PDTKKDrPKvUM2Wxs+sOQbO1h8 aUoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696230189; x=1696834989; h=in-reply-to: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=8xam3PZVeEtEQPfmOLn7BWSBTDM+HLGUGDwJNItVyho=; b=mZKif+crFqat1s+0GuuNKOSetEFkGllWD5FCm43GDsJd4A7NHVANzN9SBHar7RGoSf nMJOqIbwoYQtDpEKjbOpeyni8KgCzioclDltVgbVLGT4K61kVPl0Ki+yi9A5WXrqVRfU xLeZW9to8k8V8NoRmohsAOV4WlDO2OnyFxOjywS92+I+AkkFJZD1klfPQdCZ01GY3HbC PVN6YhNjUgje49wc8MuTiZ/QiqY8C8cu112NUrPTuAgpGCKYxW4X3s/WzlHRdGABWg1b vSbn0V0AKWTmcoNwF0wv9wXnyqwhefZP1y1uT8RvdecjsEPrIZtJ3scfLSpGoIpwaIBp ZusQ== X-Gm-Message-State: AOJu0Yx9CNPWJBSL73a9qeaLK9enYDsL9Z46lsnn5kEnaphcf4A3UvFw nc3eaEa7a/pzpMyt5LJIgCk22g== X-Google-Smtp-Source: AGHT+IHe/uakDLQktyMmNkscQDeTYcwcQmvAInoA17Wx3S0bsUubjmPjLLx5Je6hz+4d9qyLvWv7uA== X-Received: by 2002:a7b:cbc8:0:b0:3ff:ca80:eda3 with SMTP id n8-20020a7bcbc8000000b003ffca80eda3mr8715560wmi.10.1696230189198; Mon, 02 Oct 2023 00:03:09 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id d4-20020a05600c34c400b003feea62440bsm6649360wmq.43.2023.10.02.00.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 00:03:08 -0700 (PDT) Date: Mon, 2 Oct 2023 10:03:05 +0300 From: Dan Carpenter To: Shengjiu Wang Cc: Abel Vesa , Peng Fan , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] clk: imx: imx8: Fix error code in probe Message-ID: <06727485-a142-4ebb-b764-49841537d44b@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <44bacaba-848b-4e62-908c-16538330d4dd@moroto.mountain> X-Mailer: git-send-email haha only kidding Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Preserve the error code from devm_clk_hw_register_mux_parent_data_table() instead of returning success. Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver") Signed-off-by: Dan Carpenter Reviewed-by: Peng Fan --- drivers/clk/imx/clk-imx8-acm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx8-acm.c b/drivers/clk/imx/clk-imx8-acm.c index 83019b986622..550ceac45ff2 100644 --- a/drivers/clk/imx/clk-imx8-acm.c +++ b/drivers/clk/imx/clk-imx8-acm.c @@ -372,6 +372,7 @@ static int imx8_acm_clk_probe(struct platform_device *pdev) 0, NULL, NULL); if (IS_ERR(hws[sels[i].clkid])) { pm_runtime_disable(&pdev->dev); + ret = PTR_ERR(hws[sels[i].clkid]); goto err_clk_register; } }