Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6712063pxv; Thu, 29 Jul 2021 23:57:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY/UfapNtE9STus4ngUI0e4KbzJazs+twyuN///fXWZeAdBGat0txZJwU5JJZWWXPq4VHu X-Received: by 2002:a5e:9743:: with SMTP id h3mr1286853ioq.52.1627628256700; Thu, 29 Jul 2021 23:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627628256; cv=none; d=google.com; s=arc-20160816; b=wH5WsOGS1JzkRuwVCqbImet4/n0qTYGsFcsSTdV0iX5/82RhmGFAYyDLP+AxaGHbXG +5s76U9T9TGp8UGwjZsRExp/bq3eN47kXQnlaZu82WrM16sgwiTHIuDFQprUoFcYTpeK jI7tMfPVe+0MsSb2GAtbMEqQBKxe2j3zw5ZDSf49SnFs9QJekWDso55g9FTxAuy1F+Qv mEhmpoIwqRbj3eWOywBBCwM+L5LCsSkWOlRB+4IlRKT31thaXyw2am23DwehSA/tcZyv 5SjWFA3kANDAXlL70oypLjQj1WwwTDRcJHFSSoHJZ8KKEvpExuatRt2pG3uqeyvt+vr8 lgLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Zs9ujH5CLSZY7q1paYnaX5190whuSKG1UYZ6A01LvS8=; b=SxszWAwSN/+3IxJ72ICtIWRTRWPCmY3Pu/nuVMDRIEmNegFg0NxPUfdQQuBb3mWDH9 /Ql2V7CInni6qW5nQbWAEUfaqCL52Uhr5sUXbG9OvQ3e7hmvQ4v3XjCYqGJ+93izQbQA Amwlwh8M1gwIGGiR/QI5Rp9doufeTsVhYnpuB+NoUIjnxvvp9P8GI+JVgIU+JNZ33tYa JFLY4iYlmjAst6oCUXLa5PRraWHAjqPhhjbix8enRBNQSlSrYqVLuilISDygffBFPXKu t7EKjxnaTv/7wI/P1mf9n19DoSv31NHmZaekEVczP4vXqGGObJ+mvzTrStTzeAwHjRno Yeiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e127si810026iof.13.2021.07.29.23.57.24; Thu, 29 Jul 2021 23:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237678AbhG3G4p (ORCPT + 99 others); Fri, 30 Jul 2021 02:56:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:42778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237463AbhG3G4p (ORCPT ); Fri, 30 Jul 2021 02:56:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C549E60F6B; Fri, 30 Jul 2021 06:56:38 +0000 (UTC) Subject: Re: [PATCH] m68k: coldfire: return success for clk_enable(NULL) To: Dan Carpenter Cc: Geert Uytterhoeven , Defang Bo , Steven King , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Marc Kleine-Budde , Christophe JAILLET References: <20210729122702.GA27150@kili> From: Greg Ungerer Message-ID: <10e74100-2f3b-6c71-3e13-ba9a33766bf1@linux-m68k.org> Date: Fri, 30 Jul 2021 16:56:36 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210729122702.GA27150@kili> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/7/21 10:27 pm, Dan Carpenter wrote: > The clk_enable is supposed work when CONFIG_HAVE_CLK is false, but it > returns -EINVAL. That means some drivers fail during probe. > > [ 1.680000] flexcan: probe of flexcan.0 failed with error -22 > > Fixes: c1fb1bf64bb6 ("m68k: let clk_enable() return immediately if clk is NULL") > Fixes: bea8bcb12da0 ("m68knommu: Add support for the Coldfire m5441x.") > Signed-off-by: Dan Carpenter Thanks Dan. Applied to the m68knommu git tree, for-next branch, with Marc's Acked-by added. Regards Greg > --- > I can't actually compile test this, but it's correct. > > arch/m68k/coldfire/clk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c > index 2ed841e94111..d03b6c4aa86b 100644 > --- a/arch/m68k/coldfire/clk.c > +++ b/arch/m68k/coldfire/clk.c > @@ -78,7 +78,7 @@ int clk_enable(struct clk *clk) > unsigned long flags; > > if (!clk) > - return -EINVAL; > + return 0; > > spin_lock_irqsave(&clk_lock, flags); > if ((clk->enabled++ == 0) && clk->clk_ops) >