From patchwork Wed May 22 01:15:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 164761 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp250714ili; Tue, 21 May 2019 18:15:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPnbLnf/6I3EIRsyH6YvNSt3CkAwvnWo9GFaA9FKqe71svzdb9ECEIRCnZuogNISK/nu9z X-Received: by 2002:a63:cf0d:: with SMTP id j13mr42876197pgg.433.1558487757971; Tue, 21 May 2019 18:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558487757; cv=none; d=google.com; s=arc-20160816; b=V8GesNkeXQMocgQyaeGoCPSYREYZI/dDWYu7VaLUjq8bhycAlCs6HU6OUIY1jB4cQK 5VpeuzPIBiJ78qc65K8WdgDJQHGgDoJtlNrRBaGvMH/A2LEiTwuvJ6ni4UHzlDLaNJeC iOn8z+EVQHkyxBcxB3bbnWquVS9nf/62maaqeUect3eVozZwiIXNtcUGsrfWrM0WLDrO OQsTikIE2szLO3D8SXOt0TmZvnKOH05v8tFArna9Nfl4fjIIiNIUFylmi/cdKQS6NoZR 3Wx+9uIsoZ79LcZjDDXS44wUwqK5rmbIQqtOSqwnUMD5IUlfGLAZugTUbCRkgzw3oQsu Ocxw== 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=4R0Z1avkl5DcwArAEdYF5RKsOqx23+ElfNwQfhlhU8U=; b=wl6zxGIBlrqfzO8gnY+axxrwisRhGwKrEbMDXqk6JlNs5k/wxWqAYMJqGhjjBXjBxb iG2jgle1U8PrmDnKOBbYZXUCtcEKnc8CJDPuqxPpE7DI6Nen9nZWk9dteoPfJkUMmNV2 WehEfB91psEFeG/Zpr31dOvqnPnn35KPl2itY/sAoMzl6OBp0XUgsGEwRcMi51gonU/g exCVZeTHbIztK9wmUXwncSWwC1kbcjs1Zb1FQm4c7CRFlcaMak+n6wf6CYy9jhs7Y4ux L6jTyJmIUFjCF3LgkgnCwy1Em73h4opssceNdAcZWXJmFcCcA5U8x9/85cs5S/VktLgu eGeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N+QM6K+m; 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 w62si16737344pgd.467.2019.05.21.18.15.57; Tue, 21 May 2019 18:15:57 -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=N+QM6K+m; 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 S1728339AbfEVBPz (ORCPT + 30 others); Tue, 21 May 2019 21:15:55 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42576 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728305AbfEVBPx (ORCPT ); Tue, 21 May 2019 21:15:53 -0400 Received: by mail-pg1-f195.google.com with SMTP id e17so257906pgo.9 for ; Tue, 21 May 2019 18:15:53 -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=4R0Z1avkl5DcwArAEdYF5RKsOqx23+ElfNwQfhlhU8U=; b=N+QM6K+mnnUhvHa1pDTd4k5bms70Vaku4Jjp/BA2dHEnOKKOnLtyIKbS/22xAaO5WJ sqV6/CiZpmxKCDFjs1WN4GbfR+dwiBNCrkD/fGw1TgFbrIuB2fFGHlqzCOA16m6sgSts B7bFD7A12JdmPrjFhuEHpW6gIsDlHC52uzpG/x96Rsq4sBLNNDKBmaBNxpPNlPqIDhMH VdhqfkIvdXLUTSgi9+hjW9/+yJDhs303p/1dV1ki442GfeO0gj8pvyBcVXXbA2RqxvXI xOwYpHkDQD6docsy8KCY2NjXUrUPU/j/IdJMNHDkG3gYHfNPCIUo+2XJpvREn7X8+yy2 Xo0g== 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=4R0Z1avkl5DcwArAEdYF5RKsOqx23+ElfNwQfhlhU8U=; b=Mxbc4Di0QKnNplvCBac2+2PEaqORaghElT3UVSgBs+kEH80Nm9iZ9QsgoY4yIfe5n+ VQePEiRjRw1fC5ymb6VnAponsBf8wlOd/vmhtsaeMs+5qJIrwfswfFRF10RdbIX3WQsK 6A7x2VetnuspzC4PkIFPh3niO0VISfjp2qkwwUBhU8+aq+Vp8oadfA9xvKkNgD3Mmfjl C7p+lvdKyYSM8TOH59KTB+M6zSCYR9LEk7F7C+zsDhWLwxGYOjSntLFUxSXMyd9BXImq pggXWPVSFBU2ySnFdij5L+rVs8JmMHsaRZC+f1i2wVtv36cyVZ7P574RILIZp4qEAyF7 YFvg== X-Gm-Message-State: APjAAAW9imoqHgN0hBiljFUSyQdsR4n2C+P9/ObkIoKwOh3Av8JsjO1N w+TM36HFZzmnODO1Vn4HwbH3jw== X-Received: by 2002:a62:640e:: with SMTP id y14mr72010463pfb.109.1558487753226; Tue, 21 May 2019 18:15:53 -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.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 18:15:52 -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 the return value of sprd_clk_regmap_init() Date: Wed, 22 May 2019 09:15:04 +0800 Message-Id: <20190522011504.19342-5-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 --- drivers/clk/sprd/sc9860-clk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 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); }