[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5509d4e5-a6eb-c3ff-e89b-a4470ec3920a@canonical.com>
Date: Fri, 3 Apr 2020 11:01:25 +0100
From: Colin Ian King <colin.king@...onical.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Dan Carpenter <dan.carpenter@...cle.com>
Cc: Guenter Roeck <linux@...ck-us.net>,
Alessandro Zummo <a.zummo@...ertech.it>,
Chris Packham <chris.packham@...iedtelesis.co.nz>,
linux-rtc@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][V2][next] rtc: ds1307: check for failed memory allocation
on wdt
On 03/04/2020 10:22, Alexandre Belloni wrote:
> On 03/04/2020 11:45:04+0300, Dan Carpenter wrote:
>> On Thu, Apr 02, 2020 at 04:53:12PM +0200, Alexandre Belloni wrote:
>>>
>>> As stated, I also prefer keeping the watchdog optional and ignore the
>>> error.
>>
>> Hopefully you aren't running out of memory on start up. In current
>> kernels small memory allocations like this never fail so it doesn't
>> really affect runtime. It only silences the NULL dereference static
>> checker warning.
>>
>
> Yes, so the
>
> if (!wdt)
> return;
>
> would be enough instead of introducing unnecessary error handling.
>
OK, I'll send a V3 later today.
Powered by blists - more mailing lists