Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1038032pxb; Thu, 4 Mar 2021 01:21:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGmFZ2hDHWkkvLNz2Fy4k+At+G7G+q2gqvkxXRqNp+KTEnDfmirsuQxu6n0QI3eWS4woZw X-Received: by 2002:a17:906:1d44:: with SMTP id o4mr3014581ejh.130.1614849671839; Thu, 04 Mar 2021 01:21:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614849671; cv=none; d=google.com; s=arc-20160816; b=scsJL2XhK8D1bQouljKYqu9KnXbtZS6cXWJ97+tJobKezbAEXVRjRzC/OziuIDkC6N mX4NOhvWzavwTA2xCpuQAIWxfuGPnFB2UnGrXbLjzHOWlPCgTy5EEERZ4B+SsQZaKzAc +2a90dabdkfTlzDqk/6th6znRCxQpHVLrJxOg3SRJLVnJHobEpRNhh6L2dO1iwSnaAvR Tx+tZgg3Fs1uT1YSBMvqJd45R+hp2gLoIHzrvRuiAwdivjJTSTKSt2HpSqAIZvP85R+j g5KAhkEA2zJbPz9putg/+V+9hnVS5jQSkUbujqmmhmdOMMwYiMNekFSEtuF4+B5Ls8OV YGdA== 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=E/VBV9B29/nC2d2O1RAQAC3lst7yYbwsDT3vsorERWE=; b=qgkS1l2kMlzGJTZ8/SYeuGjDdZqPpDe5CxIJ6qol33WYe/K0P9OE6TYHirZSspm0nH 4BySwkF4JiXSOgHYe0IQmf4Av0zDJBKpef8m+NAkbXPGVHo3tx8ZWH+p92XUpE+CguiL nrN1vnugeQRlRtCvVEWb7MjzB4cSRDh0TUjOxmmrwB1Jdl+jOp2W0uMAo4D/1KeXhLwq rmZl7tIoHkZ82/XGRVHWeT/yHlZnWoDCmzgDH4F2jpFP60AzvQB5WB71nWEPACAnAeUd ipGKXOKBWSi35r5+nWKwQwvTrdJbEF85wp2hQAqdc56Ks252U1LZ6qf+xPuKBP1iURMs VWCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s17si2548869edd.576.2021.03.04.01.20.49; Thu, 04 Mar 2021 01:21:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242030AbhCCOmX (ORCPT + 99 others); Wed, 3 Mar 2021 09:42:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1843013AbhCCKXt (ORCPT ); Wed, 3 Mar 2021 05:23:49 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CD20C0698CC for ; Wed, 3 Mar 2021 01:11:03 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 9DD621F45983 From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, weiyi.lu@mediatek.com, Collabora Kernel ML , kernel test robot , Dan Carpenter , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH] soc: mediatek: pm-domains: Fix missing error code in scpsys_add_subdomain() Date: Wed, 3 Mar 2021 10:10:54 +0100 Message-Id: <20210303091054.796975-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding one power domain in scpsys_add_subdomain is missing to assign an error code when it fails. Fix that assigning an error code to 'ret', this also fixes the follwowing smatch warning. drivers/soc/mediatek/mtk-pm-domains.c:492 scpsys_add_subdomain() warn: missing error code 'ret' Fixes: dd65030295e2 ("soc: mediatek: pm-domains: Don't print an error if child domain is deferred") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Enric Balletbo i Serra --- drivers/soc/mediatek/mtk-pm-domains.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c index 694d6ea6de1d..0af00efa0ef8 100644 --- a/drivers/soc/mediatek/mtk-pm-domains.c +++ b/drivers/soc/mediatek/mtk-pm-domains.c @@ -491,8 +491,9 @@ static int scpsys_add_subdomain(struct scpsys *scpsys, struct device_node *paren child_pd = scpsys_add_one_domain(scpsys, child); if (IS_ERR(child_pd)) { - dev_err_probe(scpsys->dev, PTR_ERR(child_pd), - "%pOF: failed to get child domain id\n", child); + ret = PTR_ERR(child_pd); + dev_err_probe(scpsys->dev, ret, "%pOF: failed to get child domain id\n", + child); goto err_put_node; } -- 2.30.1