Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1638400ybm; Tue, 21 May 2019 18:17:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtQqcamZViaOfGFMvPOfcO+vj+GLvfrMUCf2F5l7K2ERjSUIeerHRZjBqod+FtS4pcdEa8 X-Received: by 2002:a62:bd0e:: with SMTP id a14mr72480624pff.44.1558487867627; Tue, 21 May 2019 18:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558487867; cv=none; d=google.com; s=arc-20160816; b=YFUX4J6l6SoyZ6U3i9AqGd6XNCLxbIZCFAD+gSw33CyM6ZVYk2JqbWVmvedvjrOESS NWJsWXl/p2ytUNnM5FBADyXeYnjTqgtiEtO+DHJpjeoKqYRXs2gfy54HnKzUKNHZz9BR Sqokwtyx9fFUobsMrI4b8U3NVmwVcLdEKNmf1O/+TFEO+gySZEvQ9eYnCbcuFokStCl7 EqRGhklhaMH10FxO88AAYE3EQb12mAY/USelXpZrqTLRXr+0nrNu2Hn5GaHpRrT214Ey 00urDxkrSgzn+ZDxTifY7U6cEqrqC5FvW8chCcjg8oY0E4E4ILx3+Nm8YkwAPvI9oBVj n1NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=NTS1odQw+3K/o26m56A8dudsgiFBip3uvfuWtKKFHvU=; b=aE1hWqtX2UwxSZvctna7nw6Hzpl2+c2PERrOPSW2ZruYtdtEl9QDiSFQIuAwK5rk4R 30yUIWFahQDzqODoGiEOyyL1kC19vkhIdtMNk1MhWkJCF/fElPwQJbanvBzw0IbcupCc xpROCNyCIW9XI+WXWWlG1NVkQsYh9G+E0lYKQCNTRzbA117jOF86gKj6F90bf3IA2TFG wqRMf6nRsYSLstZA0GN5ReC2NDPED7gBiPMyCG3fdKdrxPoR4YEGz7N0EUnq8uFcEkZR 1niY13gpGKhzKDB7V1+7wBTIj5OEn9va4ZIEZSyu3HeE4q5iRqxCTtVStsa0C5XJmzjX m8Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B3XhrGin; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s145si26837708pfc.283.2019.05.21.18.17.31; Tue, 21 May 2019 18:17:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B3XhrGin; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728288AbfEVBPw (ORCPT + 99 others); Tue, 21 May 2019 21:15:52 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33490 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728207AbfEVBPv (ORCPT ); Tue, 21 May 2019 21:15:51 -0400 Received: by mail-pf1-f193.google.com with SMTP id z28so392462pfk.0 for ; Tue, 21 May 2019 18:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NTS1odQw+3K/o26m56A8dudsgiFBip3uvfuWtKKFHvU=; b=B3XhrGinnvN8sKjWn4ooBhJDwiBZy++xwD3PIwifiEQmGkn9dXEIXn56iDzEoxfVvj buXxk5oR6q/tDHs5OOaUOkRWM1sLkSX4JU0PyfPJCY/0ZHnvNjW+5t6L/klL89CpmkOU RskDCpXRp8Nb0ntd+sjYiNmTwpWddBd2/vc+Qss6vnBNh0rx9yQ1VlRU+ynGuu5CgZL9 riuxQgdodNGLJ7JIcSjyTdkhtNXRSVa4DnyqinGH1zfrS2v3sYsMbbBF1l5tT5dXe7R0 umoIlSFNx9D9SlsIIXLF4fISmz0vBqrgIOvMii2WHcJXQ3fqvIMmHOW5xZARBO3AlqvT jDmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NTS1odQw+3K/o26m56A8dudsgiFBip3uvfuWtKKFHvU=; b=Nku6EqHXsaLdK9WhO0NCLVG3KwpLzrcZ3pk/engucfBU+HJ+Q/Xu1NB5uhAyn78rPn 82/ja1QwAisNEMYP0j6GrtqhikyrssgHpEneU4upLFYeZ35sp2XuVz1P6tjt3eq3fHtP pQhBpy2dPpgRsT8RuRampoh6mAtfvZ2AAcMwpjkkf88/JpH7LgiQU5DLOd+cm+Hw4Ttn S1y5opn0RH9kcE7z2/4mmFqtfjxeRM7KrThhtYqilqOcezzk417aonQXEI29DWLeAJCB S/glSJ/fsJiSIRPFQN91Pk2ajVwhfPw9PYWpYmwd7VPFsgPhPtwaOglP31H4/bpsFLLo MrqQ== X-Gm-Message-State: APjAAAUiYm1ORY9J+e3SeL7wApQKXD+fnLauSTfLZtsltF32RNK+6cs4 k9xhi8l2+OguQcPeTH0ZZ9CZjQ== X-Received: by 2002:a62:6585:: with SMTP id z127mr52504792pfb.179.1558487750638; Tue, 21 May 2019 18:15:50 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id e184sm31756061pfa.169.2019.05.21.18.15.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 18:15:49 -0700 (PDT) From: Chunyan Zhang To: Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Orson Zhai , Chunyan Zhang , Baolin Wang Subject: [PATCH v2 3/3] clk: sprd: Add check for return value of sprd_clk_regmap_init() Date: Wed, 22 May 2019 09:15:03 +0800 Message-Id: <20190522011504.19342-4-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190522011504.19342-1-zhang.chunyan@linaro.org> References: <20190522011504.19342-1-zhang.chunyan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sprd_clk_regmap_init() doesn't always return success, adding check for its return value should make the code more strong. Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang --- drivers/clk/sprd/sc9860-clk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/sprd/sc9860-clk.c b/drivers/clk/sprd/sc9860-clk.c index 9980ab55271b..1ed45b4f2fe8 100644 --- a/drivers/clk/sprd/sc9860-clk.c +++ b/drivers/clk/sprd/sc9860-clk.c @@ -2031,7 +2031,9 @@ static int sc9860_clk_probe(struct platform_device *pdev) } desc = match->data; - sprd_clk_regmap_init(pdev, desc); + ret = sprd_clk_regmap_init(pdev, desc); + if (ret) + return ret; return sprd_clk_probe(&pdev->dev, desc->hw_clks); } -- 2.17.1