From patchwork Tue Aug 4 06:12:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 247427 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp78437ilo; Mon, 3 Aug 2020 23:12:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZWAPs9NzDGUU46TB8iwCP8QjsXpirADizQq7Bzig3NfCDju7m/R1mq5CpVlPmgewHJPNC X-Received: by 2002:a17:906:82d5:: with SMTP id a21mr19610121ejy.213.1596521548774; Mon, 03 Aug 2020 23:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596521548; cv=none; d=google.com; s=arc-20160816; b=UPHkOEV4DWisHx0oI+sfd0u1YYsTIIpNZFGkgvlttwBRKC9zb3TOGAGALiAIGbd5w5 aG2c9DijvOSQDAIGR6R6xhKXFJUVdSWym3e+q4rKcfho+LY7kK3nTq4QYhRd7xXNQM3b 3pc6w2vLB2OphRX9IiTvIfoZAVMKyjiIJsm5wuiSr4PuDd5iQkXcUwRTKVVlFVdNwZ3s ilk6NqfsVlpCgrnqKAZRQmUbVd52l6eg4hMUe9SYzjojvo8RZPlMWJmFzBDRo1OM+ME8 lltyBkTsrdFufYz5R/TSYr+NGJZkfpEMX6L0byQreFS0h9IqBJe8VtxMsh8CQu57hgmn q7Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=h1MIe7+guqaF7sFDMh4fJlyTfxy7EDF7dzFmjh9wV8w=; b=HvDj6x9izweHewLocoH6mOl5WlVpw89eB2XGDtecRp/TdzqB0OrhtF151x7y/QqcPJ 4RqUxyr5u2yqYpPxlV7si/c/F+pxsaTHLS1YxXdlKZ3rMy75RTwSwa1KbsGQPrUFfuQv u0Z8kB1hayH0i6tyh4X8yisrdpwXUTEFudrDyWfYaKeJJV5OLkfYKpJRLbNKhwA9GsF5 KQjGFNXOKuLrES6KQE55ErpW1Y6cWcAMgyGw97pCZKwNV0kMR4iaI9OjUPsIItgrdUcY oTbAJpsOSpCQaFiXoRG2aLinBqieJi9p0iUwvZbe1+TuDwv5ZSIvdDjTOOddLfdQL6Yu +xwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=vEY7jUoQ; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh23si9777087ejb.493.2020.08.03.23.12.28; Mon, 03 Aug 2020 23:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=vEY7jUoQ; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729323AbgHDGM2 (ORCPT + 4 others); Tue, 4 Aug 2020 02:12:28 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:59389 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728602AbgHDGM1 (ORCPT ); Tue, 4 Aug 2020 02:12:27 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200804061226euoutp01475877a10ba53a870ee509988eb4b394~n__M4pELe0873908739euoutp01P for ; Tue, 4 Aug 2020 06:12:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200804061226euoutp01475877a10ba53a870ee509988eb4b394~n__M4pELe0873908739euoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1596521546; bh=h1MIe7+guqaF7sFDMh4fJlyTfxy7EDF7dzFmjh9wV8w=; h=From:To:Cc:Subject:Date:References:From; b=vEY7jUoQk+C2zGaMinQgVPU2BqGZzJwHWP9GUir948hqICNKmj6yCVOeNNn7OzFTW WDDxWqXWLQTkln5gj5FNiMdrn0VgWy71yFZ7W5P8QugBIVzeiRESOsBOTlddFhDLcT G/2v/LO7rh5LFGhw5Vst3xtMzHlj9W64apsG1Jw4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200804061226eucas1p1f69e5befcc49f7fe6b4db4dddd841b2f~n__Mu4wO82756627566eucas1p1S; Tue, 4 Aug 2020 06:12:26 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 13.8F.06318.94CF82F5; Tue, 4 Aug 2020 07:12:26 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200804061225eucas1p283c1e0dc404bc420a2184480fdfd2b0d~n__MBUbYS2676826768eucas1p2q; Tue, 4 Aug 2020 06:12:25 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200804061225eusmtrp12c203f5ad76b778325fddfedf6fc66e1~n__MAqmPJ0612206122eusmtrp10; Tue, 4 Aug 2020 06:12:25 +0000 (GMT) X-AuditID: cbfec7f5-371ff700000018ae-0a-5f28fc4960f3 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 9B.DB.06314.94CF82F5; Tue, 4 Aug 2020 07:12:25 +0100 (BST) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200804061224eusmtip26b15d686a10db96dc73b8ed4fb28abd7~n__Lh-wUq0707607076eusmtip2Q; Tue, 4 Aug 2020 06:12:24 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Lukasz Luba Cc: Marek Szyprowski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Chanwoo Choi Subject: [PATCH] memory: samsung: exynos5422-dmc: propagate error from exynos5_counters_get() Date: Tue, 4 Aug 2020 08:12:10 +0200 Message-Id: <20200804061210.5415-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsWy7djP87pefzTiDd69Z7TYOGM9q8X1L89Z Lc6f38BucXnXHDaLz71HGC1mnN/HZLGwqYXdYu2Ru+wOHB5r5q1h9Ni0qpPNo2/LKkaPz5vk AliiuGxSUnMyy1KL9O0SuDJ6V01mKpjDUbF882/mBsaXbF2MnBwSAiYSrateM3UxcnEICaxg lHi4fBsLhPOFUeL8v6nMEM5nRolDa14ww7Qcn3IbqmU5o0R/Vw8LSAKsZfcFCRCbTcBQoutt F9gOEYF4ia0/u5lAbGaBm4wSS84adTFycAgDxfsPloOEWQRUJQ4e+c0KYvMK2EgcXneIBWKX vMTqDQfAjpAQuM4mseXMaUaIhIvEtneLmSBsYYlXx7ewQ9gyEqcn97BANDQD/XNuLTuE08Mo cblpBlS3tcSdc7/YQK5gFtCUWL9LHyLsKNF/6AczSFhCgE/ixltBiJv5JCZtmw4V5pXoaBOC qFaTmHV8HdzagxcuQZV4SNy4VQQJkViJhQueM09glJuFsGoBI+MqRvHU0uLc9NRi47z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nfJL cvmpvjJM8JyCofOBj/K7mqzP3ug8VrLnXfEtHs1LhZVX2Ro5hSSFlFiKMxINtZiLihMBA8M6 TVgCAAA= X-CMS-MailID: 20200804061225eucas1p283c1e0dc404bc420a2184480fdfd2b0d X-Msg-Generator: CA X-RootMTR: 20200804061225eucas1p283c1e0dc404bc420a2184480fdfd2b0d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200804061225eucas1p283c1e0dc404bc420a2184480fdfd2b0d References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org exynos5_counters_get() might fail with -EPROBE_DEFER if the driver for devfreq event counter is not yet probed. Propagate that error value to the caller to ensure that the exynos5422-dmc driver will be probed again when devfreq event contuner is available. This fixes boot hang if both exynos5422-dmc and exynos-ppmu drivers are compiled as modules. Signed-off-by: Marek Szyprowski --- drivers/memory/samsung/exynos5422-dmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c index b9c7956e5031..639811a3eecb 100644 --- a/drivers/memory/samsung/exynos5422-dmc.c +++ b/drivers/memory/samsung/exynos5422-dmc.c @@ -914,7 +914,7 @@ static int exynos5_dmc_get_status(struct device *dev, } else { ret = exynos5_counters_get(dmc, &load, &total); if (ret < 0) - return -EINVAL; + return ret; /* To protect from overflow, divide by 1024 */ stat->busy_time = load >> 10;