From patchwork Wed May 22 01:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 10954681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0772E1708 for ; Wed, 22 May 2019 01:15:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E15F6285E5 for ; Wed, 22 May 2019 01:15:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CED0B286D1; Wed, 22 May 2019 01:15:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F527285E5 for ; Wed, 22 May 2019 01:15:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728022AbfEVBPQ (ORCPT ); Tue, 21 May 2019 21:15:16 -0400 Received: from mail-pg1-f175.google.com ([209.85.215.175]:37709 "EHLO mail-pg1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726466AbfEVBPQ (ORCPT ); Tue, 21 May 2019 21:15:16 -0400 Received: by mail-pg1-f175.google.com with SMTP id n27so406303pgm.4 for ; Tue, 21 May 2019 18:15:16 -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; bh=B43ZvY9Pih8gF9rNgrprI7+aOAj3WLqNtbVbB4LmDsg=; b=f7zUbSkfEtRBSQ238IKl1yTWzFYz0OLFYVtHnqzofrICkCfhRO0OJJl6srRe+I7oFo 0kvaUv0p0k/B2fXM7pwQLMo3WDOIT+CZeKTulGphvrIqQ4dHUtkhRbAHMlVkOkVJz3rE dcWKOp5OBejfGHYoHlMRBrlgnmWbn3dyqBGP7EJWOiD9KDxew5fkVEftgD3ak7YF26pF RMkUqltK30ZE6OAxeX0RltToKIisNNxxnFR+qTUgCA73v3uNeJL0jPKMmoOZmlFqPGqm Z9hVLIkhjuH8hnF+h7qcCvxmpk8xSJwIO9ihgACdryWa/PfpGMxrUzlhqz42xTqV8HDM 1bNA== 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; bh=B43ZvY9Pih8gF9rNgrprI7+aOAj3WLqNtbVbB4LmDsg=; b=QFhaggOk+YmnMpOgKCs28qPk4qe0wuD3OO4TcvhA89tG+ODriAnUYxFZltQprLcNL9 AGo1R2nxLYTVfCPCg/ZWRGyC0ICeCj401bdYCF4kpan+k0NaHM+gcixQPrHvAmYPLhvM kR98TZFoMZOvd5IGvciPOeD/M0BHTLQCvfLoX/spExv7yARCu7TIxJsQ0yl4zz4o517B nhFKSUIvwZXQcojIpwPLst/QBscY5ln+zLlj+BHs97ipmSkt+6/Xm8ywuP/Xy93tcBUd r5oNZ+A0XYAynAAuK3Nvx9OX+486ubGt+Tp4HE/0QMwS4OUaheQdR8E94M++vmiQOgMW SovA== X-Gm-Message-State: APjAAAUUAA277UoyO4ylqJBzhPv2+yIZB8rSu7apZcXz+pPtmIF3T03M MRpeo+Asx2uzx2rEB62DJf4q1g== X-Google-Smtp-Source: APXvYqxj8pVUmnXAq+rDFDlWDGnFnjxLabBHSByB5kIk9hD3o9P8TXDscTJ2+tKGPBHVoajbuZI/Hw== X-Received: by 2002:a63:1f04:: with SMTP id f4mr87295648pgf.423.1558487716008; Tue, 21 May 2019 18:15:16 -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.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 18:15:15 -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 0/3] Return immediately if sprd_clk_regmap_init() fails Date: Wed, 22 May 2019 09:15:00 +0800 Message-Id: <20190522011504.19342-1-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function sprd_clk_regmap_init() doesn't always return success, drivers should return immediately when it fails ranther than continue the clock initialization. The patch 1/3 in this set switchs to use devm_ioremap_resources() instead of of_iomap(), that will make caller programs more simple. Chunyan Zhang (3): clk: sprd: Switch from of_iomap() to devm_ioremap_resource() clk: sprd: Check error only for devm_regmap_init_mmio() clk: sprd: Add check the return value of sprd_clk_regmap_init() drivers/clk/sprd/common.c | 9 +++++++-- drivers/clk/sprd/sc9860-clk.c | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-)