[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F4DD33.2050803@broadcom.com>
Date: Mon, 2 Mar 2015 13:59:15 -0800
From: Scott Branden <sbranden@...adcom.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: <bcm-kernel-feedback-list@...adcom.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
"Ian Campbell" <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Grant Likely <grant.likely@...aro.org>,
Ray Jui <rjui@...adcom.com>,
Jonathan Richardson <jonathar@...adcom.com>,
Dmitry Torokhov <dtor@...gle.com>,
Anatol Pomazao <anatol@...gle.com>,
<devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/2] Input: bcm-keypad: Add Broadcom keypad controller
Hi Dmitry,
I understand what's missing now.
Thanks,
Scott
On 15-03-02 12:23 PM, Dmitry Torokhov wrote:
> Hi Scott,
>
>>> Hmm, also bcm_kp_start() and bcm_kp_stop() should check if kp->clk is
>>> valid before trying to enable/disable it.
>>>
>> I checked and other keyboard drivers do not check this. I return an
>> error in bcm_kp_start if the clk enable fails. On stop, if the clk
>> is not valid something is really, really wrong as well.
>
> The other drivers simply abort probe() if they can't get clock, you
> decided to allow probe() to finish and assume that clock is already
> enabled, leaving kp->clk == ERR_PTR(-ENOENT) in your version. If you try
> then calling clk_prepare_enable() with that pointer it is going to bomb,
> that is why I said you need to check pointer validity in bcm_kp_start()
> and bcm_kp_stop().
>
> Thanks.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists