Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2195539iof; Tue, 7 Jun 2022 22:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+cIBQcIQguj/cV/ibB/UM0/15Oakr7AVEUtb2N+6PN1LkLEdLCyYHjcOPJucSDy4ly/9l X-Received: by 2002:a63:1708:0:b0:3fd:8a03:dcd2 with SMTP id x8-20020a631708000000b003fd8a03dcd2mr15307401pgl.556.1654667518046; Tue, 07 Jun 2022 22:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667518; cv=none; d=google.com; s=arc-20160816; b=WKzQiCLX0bX9PAj15wXrIjpUmKPFFVu2bACJz32eGMtOhfNF1Hn0TOoLUz/VQMrQdQ wUYFoj4QbjN5fk2BkbJFzwpNZ1nL654daFJqZgDi8qNGAPDruWNU0/YGSEw5taf3pQtO slUOOBBmkzPovjIk3Lu7+eS1XY1mTzqxfffP4n9ME34a4w/QZVdFKEbDGwBvINigbTiG xfGruyeM5O8oeqqLYqD//UQdnsndxg4RYjf5UsfjBo5gyT3YdPeoTPVKepRlNBFE8DtH VDvkmbAEccaA+ypNhOfru3GljBE8zXuvVlHfgI6bZZplzplYUTk5CkvrDbeqdUhlmaUx Qtqg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=36gR4O4cQXNIXDrXZvAHAIlPCku2odZ2orWd0cACTNI=; b=URLESSrESrvliA6ntrjVypPXM3Fej0z6Y5dvlnfImrjWZVlQL9ndRoGggztsQeXELH GaDqevAdDQQ3yRpVClVXHBx8blzKhtXD258wEZRmXZczp4cQLYgW3P0pdnjqC4UFCqCw XdvPXtdAe708n9VOpN94Xj9PsSBE4acEkjzl//erbVbOUs+6EpfX2eDu7FwPcTfkVNDo nqbQBqYk4F+ioFm11xyzIAieLOX2qGtvnXzDHjWTbYUlqzWyS8BVvNonFE6PmANcKum8 oLOyMNPEU15OmIvq2l/6+6xR9JKmnvPw1kXWUh0kUGyKjN+4ZV7vrgVCmY3zyUo0kfrb Lg0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zQyVf1Wc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d6-20020a17090a2a4600b001c1171b611fsi29213582pjg.22.2022.06.07.22.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:51:58 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zQyVf1Wc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C10D46E7FB; Tue, 7 Jun 2022 22:18:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389441AbiFHAqL (ORCPT + 99 others); Tue, 7 Jun 2022 20:46:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381899AbiFGVtQ (ORCPT ); Tue, 7 Jun 2022 17:49:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD12223B548; Tue, 7 Jun 2022 12:08:28 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 00B3461768; Tue, 7 Jun 2022 19:08:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05DB9C385A5; Tue, 7 Jun 2022 19:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628907; bh=m0SeXDt7dXNDBS1M6Vwhu4t2wYrFNNLHH7CkYwqfgcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zQyVf1WcSds4a/qWWTmGCNy2qlfzdei8M2wmL92vzM8LqOOGy6NntQjPoD4URbQo4 dcxq0e3GQuEKq5w7WODB49ZMVGUqsgbry+oax2YSUyZ54z8WoKjd335dXis5gR5N6P ez7zacCP2tisLAVNn+EPa8ctwiA9Y2JrtWne4h3s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Mark Brown , Sasha Levin Subject: [PATCH 5.18 497/879] ASoC: codecs: lpass: Fix passing zero to PTR_ERR Date: Tue, 7 Jun 2022 19:00:15 +0200 Message-Id: <20220607165017.297497708@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 From: YueHaibing [ Upstream commit 81e7b165c45e94188ae8f1134b57f27d1f35452f ] sound/soc/codecs/lpass-macro-common.c:28 lpass_macro_pds_init() warn: passing zero to 'PTR_ERR' sound/soc/codecs/lpass-macro-common.c:38 lpass_macro_pds_init() warn: passing zero to 'PTR_ERR' sound/soc/codecs/lpass-macro-common.c:54 lpass_macro_pds_init() warn: passing zero to 'ERR_PTR' dev_pm_domain_attach_by_name() may return NULL, set 'ret' as -ENODATA to fix this warning. Fixes: 1a8ee4cf8418 ("ASoC: codecs: Fix error handling in power domain init and exit handlers") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20220516120909.36356-1-yuehaibing@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/lpass-macro-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-macro-common.c b/sound/soc/codecs/lpass-macro-common.c index 3c661fd61173..1b9082d237c1 100644 --- a/sound/soc/codecs/lpass-macro-common.c +++ b/sound/soc/codecs/lpass-macro-common.c @@ -25,7 +25,7 @@ struct lpass_macro *lpass_macro_pds_init(struct device *dev) l_pds->macro_pd = dev_pm_domain_attach_by_name(dev, "macro"); if (IS_ERR_OR_NULL(l_pds->macro_pd)) { - ret = PTR_ERR(l_pds->macro_pd); + ret = l_pds->macro_pd ? PTR_ERR(l_pds->macro_pd) : -ENODATA; goto macro_err; } @@ -35,7 +35,7 @@ struct lpass_macro *lpass_macro_pds_init(struct device *dev) l_pds->dcodec_pd = dev_pm_domain_attach_by_name(dev, "dcodec"); if (IS_ERR_OR_NULL(l_pds->dcodec_pd)) { - ret = PTR_ERR(l_pds->dcodec_pd); + ret = l_pds->dcodec_pd ? PTR_ERR(l_pds->dcodec_pd) : -ENODATA; goto dcodec_err; } -- 2.35.1