Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1036305rwd; Thu, 15 Jun 2023 05:40:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4SK/7V0IY21lDe/1TNMdZjqb1K/U6oFmVw9cyNqKw+LxhjZLhPm4/Ut5r1jIpmDJjFQ50D X-Received: by 2002:a05:6a20:3ca0:b0:103:a24e:9a48 with SMTP id b32-20020a056a203ca000b00103a24e9a48mr4912864pzj.17.1686832833919; Thu, 15 Jun 2023 05:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686832833; cv=none; d=google.com; s=arc-20160816; b=SrMQQfVnB1xKw2XM6ghLA+5LHqAMeYzcE6qnP1065bsL2w0Chd45LG57YSw5PZIF7r ohu90LHU4izS5rTI5ARgcRBk8BQlzvB0hb09+X1FtVokR/fK56FZoJQd6fsP1/nLgdzG riMxHfNFJLd2hLpyFuPdm2IuhhHeZv97FIuG0NpjPz3nDxcQVN2N41fDMMYt8yoXPMmg 7sD3nr9uc/l9bSm2lRuwFdd+wopzOjCtMmFCHJJ5rxrl3Qam7+aOSWlnEP7cJmGsg/9f hswLe1OEkloUrPAxbtRnzULOSL6rmyucQGgAuMW85PKzAKee60uEVGB06AAkvfQZuJD1 S3GA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EgljuJ86yP5II0bE2xSGbo0u0e2ju485aUaxj5I97qs=; b=YZSeaKkDlyo9FuA8rFE/RZaA5VfdTnqSL+GcUZcaFb8tg2euphulzeSetx2IaKMz26 +wX+5Pz4WoB8wF+HV5autV14mzHz3zrm/YjTv5oHLYI++b1tvLRmik/+2SSwcKOLIzLq qGtuC0ujVuYVspQnbnYtodH9bE7T70EW8s7Me7T+Qy7uA9XqhjGhLindlc9gAfswsLay BHT6VGGDQVFgiH6ORmyDuw78ssNA0hvu5n44wQa0ViOozIJv+VAqKECfCMzbtupGyp/g nNmwW+WKG9c6PQCKhQHQ4C2EK53Dya7kOI6Vx8MC4ce0lhmDNgpccel+SoxXLn1B0mSE USDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KEtD9Oqs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a170902dacd00b001b3d7fbb4cbsi6987469plx.71.2023.06.15.05.40.21; Thu, 15 Jun 2023 05:40:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KEtD9Oqs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344408AbjFOMWw (ORCPT + 99 others); Thu, 15 Jun 2023 08:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344402AbjFOMWH (ORCPT ); Thu, 15 Jun 2023 08:22:07 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A42C2976; Thu, 15 Jun 2023 05:21:09 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (unknown [IPv6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 76D1A6606F6A; Thu, 15 Jun 2023 13:21:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1686831668; bh=hSYDHRQZFg61OZRhqwBnz/BlpiaeFapUIjvjpav/ea8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KEtD9OqsW7lISwZrho68MiM8bf3s3nGT8DNIEW7ilAGpkszs1uR6kHuY4lbMxwkHx vv3Axz4B7shUPazZfsjXfyfPlowcg66gDiGAGS6rrDdLzwhCD4gtjgETdUzsYLPCSt C/yMzpi1f/FYTOjIfuukG5gUGNpZ/nfaULMRl1f+uJbIbp9ED5TT/pxHiO4Drac+f/ 4LgcTtGsqLMMkVL33z/6E6rdYyvNB2iEZxuv80YJs/GG1w241ZLyjgZef/XJ4crUdR ZV71jwlP/B8BDkNgjggdkazg0w2b+ms/vGe8MqrgwtH6HeXVGy/ejDw8T5HoMqd6tf CZsmvjoSESgsA== From: AngeloGioacchino Del Regno To: sboyd@kernel.org Cc: mturquette@baylibre.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, u.kleine-koenig@pengutronix.de, msp@baylibre.com, miles.chen@mediatek.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com Subject: [PATCH 2/3] clk: mediatek: clk-mt8173-apmixedsys: Fix return value for of_iomap() error Date: Thu, 15 Jun 2023 14:20:50 +0200 Message-Id: <20230615122051.546985-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230615122051.546985-1-angelogioacchino.delregno@collabora.com> References: <20230615122051.546985-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 The of_iomap() function returns NULL in case of error so usage of PTR_ERR() is wrong! Change that to return -ENOMEM in case of failure. Fixes: 41138fbf876c ("clk: mediatek: mt8173: Migrate to platform driver and common probe") Signed-off-by: AngeloGioacchino Del Regno --- drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c index daa2856d1ab7..ba1386e70a24 100644 --- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c @@ -148,7 +148,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev) base = of_iomap(node, 0); if (!base) - return PTR_ERR(base); + return -ENOMEM; clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK); if (IS_ERR_OR_NULL(clk_data)) -- 2.40.1