Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp597325ybm; Mon, 20 May 2019 23:41:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyf0X0utvnd78Gs1lRIYPewjLY5ql0tjWOcmhokNcAywdAM0SuxCGpOjWR/A80Twm3atLJG X-Received: by 2002:aa7:9a8c:: with SMTP id w12mr664178pfi.187.1558420894387; Mon, 20 May 2019 23:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558420894; cv=none; d=google.com; s=arc-20160816; b=xjGipy6sDCe+16HcxuqYId5IOesqYUgS3P0MUqNUB8esE4KntWIsyAo3WPbE6fMs9w Kq011oYQfRd3WnKTNLSzFKUAHhFyGVpnG5KE7SHnUim95Q2Y6s9JXFz6uu8FyynD3uNQ B9K7Ch36HD+lYQL/gysNL1hIZ7WGSC7SPDs6hcNt/j08SzQUxwLr09qQTOeTEbu9Khep prRU+aDxoZo2rFzG6JlEsEosX7IyVaijOSQLT3SmX3HB4wk/3Y1ci+nauyVaeRKikzVc ku7aLFqAxASkhApA51Ws9jkvRr5eGd/k+9Xw77Z8RWnhjxD/ulK2G7HAHkhpDO+ZE1Wc oA7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gBqYtocWWHik2IfGhWR+vlpOXtSgbuQgAgYwyKJnzz0=; b=Q5EYQc7Gqc0T96fx18F/kt2cWbbmnLlBaHuJLWrT0EHNpekLXmMA2EDEdeP+ttdn7e ohTqfPAt7f6RyeXNQptKPvJj///FZu8yswWoLw170cxyIUdWYhu+X6ofMcAJJ7NLpCnA +r4nGBPoeNdSB17ZDgzhoYs0oK4WjmymP/DMifXNBp88ul4fZiW5IZ9hakj6CNYYp9cx nz+jmCRJRGyLDNLFzEngjjZH2/DNbXhJa1wXz4+v8ZPhGQTbzZR+uEzNOmcj4PnrHHEW s8NrIoRhhiu2vC3/XX79d4d3LW2P7cXd1/yh9KpkBaG9XVfyItWkYtaEpE8gOTNG6R8z 6wJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vH3s2Jen; 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 129si22668056pfb.270.2019.05.20.23.41.19; Mon, 20 May 2019 23:41:34 -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=vH3s2Jen; 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 S1725930AbfEUGjL (ORCPT + 99 others); Tue, 21 May 2019 02:39:11 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:35781 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfEUGjK (ORCPT ); Tue, 21 May 2019 02:39:10 -0400 Received: by mail-ot1-f68.google.com with SMTP id n14so15347831otk.2 for ; Mon, 20 May 2019 23:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gBqYtocWWHik2IfGhWR+vlpOXtSgbuQgAgYwyKJnzz0=; b=vH3s2Jen3NIt0L0ETP2uQPLNLW4pl5U3URMArHcl1sw9LHDXa96LfkKDYnL50Y3spO GK0ipFX+TkHmCIZrFoVACa+wQy4W3zkavs5E6tF21EHtHkV72hubWTE77LmsxxqGotqQ rngoy9AKSPSiUmJuVQ7OqqIwo//LpGCpDo5Jinbyb8z1FdQoC6GcnHoRfTF0NUexXkwO u74Jr+am7cwtEqeD99VVZPR3r5Mmg6CQagWBfUo6kmbwoCTQ20oURWNwFMQOBnA4wXeV tTFzyeCFbZwWcu76HmnqLaiGHH6WgiMGofkq9aBgc31iXC9u83ezx7dvogalrcpN49vS f15w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gBqYtocWWHik2IfGhWR+vlpOXtSgbuQgAgYwyKJnzz0=; b=qwlkpwIXN9ZE7OR/aRTHLrG3O6JXO4WMLLFr+yxBheqWxRrB0Ai1xRyGFBMtm5OmeI AkiuuV608GzpYhUQWLqHI9L/mR/6pa+6/BM+FIkjRpGyRjTtMzLZXq82BM2sVwMFFBSy 9URLgSpoIL5HarHV4O02bON5lJUo1eitXSSPIHzKkZ/jggjwKAO5DRBoFfnQiI721KX/ fTY5NraDbWMI+Z2xLFv4d9Z0NXec9e69qoyKJrFle7xg2+ig/F0Mq3ByHo0ILXziRtAJ 9OiiIBP+68lg9FuN4vwHSSGigUBN7FPH6dQFg+RMqzsPd+rJwNPuaxBSddXNK0yimq8u MmYQ== X-Gm-Message-State: APjAAAWNYw/lMhgQ4p0/0gdkE5kJB8fTsX1AAckHRARpxyhXcAwd5J1g 18R3FQbNrDmwRcQRxjUccNVaCBcM/SjT32Ek1+WzeQ== X-Received: by 2002:a05:6830:1597:: with SMTP id i23mr435453otr.281.1558420750146; Mon, 20 May 2019 23:39:10 -0700 (PDT) MIME-Version: 1.0 References: <20190521060952.2949-1-zhang.chunyan@linaro.org> <20190521060952.2949-3-zhang.chunyan@linaro.org> In-Reply-To: <20190521060952.2949-3-zhang.chunyan@linaro.org> From: Baolin Wang Date: Tue, 21 May 2019 14:38:59 +0800 Message-ID: Subject: Re: [PATCH 2/2] clk: sprd: Add check for return value of sprd_clk_regmap_init() To: Chunyan Zhang Cc: Stephen Boyd , linux-clk@vger.kernel.org, LKML , Orson Zhai , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 May 2019 at 14:15, Chunyan Zhang wrote: > > 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 > -- Baolin Wang Best Regards