From nobody Fri Sep 20 20:28:44 2024 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 54BAEC7618D for ; Thu, 6 Apr 2023 02:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234905AbjDFCnb (ORCPT ); Wed, 5 Apr 2023 22:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234867AbjDFCnY (ORCPT ); Wed, 5 Apr 2023 22:43:24 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F5FD86B6 for ; Wed, 5 Apr 2023 19:43:23 -0700 (PDT) Received: from localhost.localdomain ([172.16.0.254]) (user=ziqin_l@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 3362g2eK004176-3362g2eL004176 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 6 Apr 2023 10:42:09 +0800 From: Ziqin Liu To: Matthias Brugger , AngeloGioacchino Del Regno Cc: Ziqin Liu , Dongliang Mu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH] soc: mediatek: mtk-svs: change the function IS_ERR_OR_NULL() to IS_ERR() Date: Thu, 6 Apr 2023 10:42:00 +0800 Message-Id: <20230406024200.3126080-1-ziqin_l@hust.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FEAS-AUTH-USER: ziqin_l@hust.edu.cn Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" nvmem_cell_get() will return an ERR_PTR() on error or a valid pointer to a struct nvmem_cell but won't return NULL, the check function should be IS_ERR() instead of IS_ERR_OR_NULL() Signed-off-by: Ziqin Liu Reviewed-by: Dongliang Mu --- drivers/soc/mediatek/mtk-svs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index a7eb019b5157..8127fb6d587b 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -1726,7 +1726,7 @@ static int svs_get_efuse_data(struct svs_platform *sv= sp, struct nvmem_cell *cell; =20 cell =3D nvmem_cell_get(svsp->dev, nvmem_cell_name); - if (IS_ERR_OR_NULL(cell)) { + if (IS_ERR(cell)) { dev_err(svsp->dev, "no \"%s\"? %ld\n", nvmem_cell_name, PTR_ERR(cell)); return PTR_ERR(cell); --=20 2.25.1