[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a280604-16f2-776b-d997-d5882af6fe35@gmail.com>
Date: Mon, 12 Mar 2018 11:21:24 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: Richard Weinberger <richard@....at>
Cc: dwmw2@...radead.org, computersforpeace@...il.com,
boris.brezillon@...e-electrons.com, marek.vasut@...il.com,
cyrille.pitchen@...ev4u.fr, dedekind1@...il.com,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 0/2] mtd: use put_device() if device_register fail
On Monday 12 March 2018 01:05 AM, Richard Weinberger wrote:
> Am Freitag, 9. März 2018, 11:50:47 CET schrieb Arvind Yadav:
>> if device_register() returned an error! Always use put_device()
>> to give up the reference initialized.
>>
>> Arvind Yadav (2):
>> [PATCH 1/2] mtd: use put_device() if device_register fail
>> [PATCH 2/2] mtd: ubi: use put_device() if device_register fail
> Uhh, this is not obvious. Does device_register() really always return with a
> reference held in all (error) cases?
>
> Thanks,
> //richard
if device_register() returned an error! Always use put_device()
to give up the reference initialized.(-- Please see the comment
for device_register() ). put_device() is able to handle those case
where it'll not return a reference.
~arvind
Powered by blists - more mailing lists