Received: by 10.213.65.68 with SMTP id h4csp1799426imn; Mon, 19 Mar 2018 13:35:47 -0700 (PDT) X-Google-Smtp-Source: AG47ELvQS+2u7qoRXqxGt+2Jw5tKK9Zld9QQc0xiVdowq51NYBWyzXdyu48fpSi3tUJ/E8r1dBOK X-Received: by 2002:a17:902:8d87:: with SMTP id v7-v6mr13784445plo.146.1521491747857; Mon, 19 Mar 2018 13:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521491747; cv=none; d=google.com; s=arc-20160816; b=Y6uE5OsabNgK01fP/RXGqBFCp/R98ttn9km8ck8MRlz/KVVQY4w2RxM9gaRUlTGoyN ThRniQTZ1kLDzJzLo1seO5EH/QrVQmqpxdjf533f95M6I3mFiwDfe9pqfhlIjtQDNveP LjkXHx+6NdPqp1Q8q8dSAzhialVqRpCcrQCA3JAE04epQdi8PLwEYKfJotSKyCFUl6kC 42qeRx3STO8dafzK5AcKVdttfUUFbGNvPj5FMGR/5aiJdYixm2gE2sWZtbqYNH7Pqtaj 1hxG95cdnAHA2AcqNjpZA+CU40fOSahF56oqXH3Z28svVt0C3jgAnz6c8BFvZlrzOudk opfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dmarc-filter:arc-authentication-results; bh=C3nNjwtI/VOh4n/b2y4b+BDK3gFY7NW2SjINElIKxfI=; b=a7tVyjtE1gQF/4k5AdvcwvTPtFrRV8+ql/9tSenSpP7O7ngyfDGmPmKUed6F8r6Rtk sZA1YvBfYOUlRjzSSnKRavKe7gFG9Stz3uOJky6m5AcAmzTrUQUxb22LPj6qsrWAqcxc ANgrhFGZRZcIS348kAAiWRDjsIP7FCHoQpkb18YdwB0eQYCBz7rnBhIB7DD5jZnwL/t0 +vZquZxe/03fHLyKpVJ9CslyDaokrYiOWDJ9ckKKT29Y7CBq9Af7d8JW3tp1oOjESoIK 1ek6MISEea552T4udp3Caqi3BcTfi8mJu95GL+XwbpKcbRuIHuHmmykYVZZrnhpfVnQA D5uw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m65si47217pfc.9.2018.03.19.13.35.03; Mon, 19 Mar 2018 13:35: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030695AbeCSUbb convert rfc822-to-8bit (ORCPT + 99 others); Mon, 19 Mar 2018 16:31:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:36830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030521AbeCSUbZ (ORCPT ); Mon, 19 Mar 2018 16:31:25 -0400 Received: from localhost (unknown [104.132.1.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED98620838; Mon, 19 Mar 2018 20:31:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED98620838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sboyd@kernel.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Rob Herring , Ryder Lee , Stephen Boyd From: Stephen Boyd In-Reply-To: Cc: Mark Brown , Lee Jones , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Garlic Tseng , Ryder Lee References: Message-ID: <152149148431.242365.4625152577833480987@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v4 3/6] clk: mediatek: add audsys support for MT2701 Date: Mon, 19 Mar 2018 13:31:24 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Ryder Lee (2018-03-06 01:09:28) > + > +static const struct of_device_id of_match_clk_mt2701_aud[] = { > + { .compatible = "mediatek,mt2701-audsys", }, > + {} > +}; > + > +static int clk_mt2701_aud_probe(struct platform_device *pdev) > +{ > + struct clk_onecell_data *clk_data; > + struct device_node *node = pdev->dev.of_node; > + int r; > + > + clk_data = mtk_alloc_clk_data(CLK_AUD_NR); > + > + mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks), > + clk_data); > + > + r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); > + if (r) { > + dev_err(&pdev->dev, > + "could not register clock provider: %s: %d\n", > + pdev->name, r); > + > + return r; > + } This fails to remove the clk provider when devm_of_platform_populate() returns an error. > + > + return devm_of_platform_populate(&pdev->dev); > +} > + > +static struct platform_driver clk_mt2701_aud_drv = { > + .probe = clk_mt2701_aud_probe, > + .driver = { > + .name = "clk-mt2701-aud", > + .of_match_table = of_match_clk_mt2701_aud, > + }, > +}; > + > +builtin_platform_driver(clk_mt2701_aud_drv);