lkml.org 
[lkml]   [2018]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: hns: use put_device() if device_register fail
From
Date


On Monday 12 March 2018 08:13 PM, David Miller wrote:
> From: Arvind Yadav <arvind.yadav.cs@gmail.com>
> Date: Fri, 9 Mar 2018 16:11:17 +0530
>
>> if device_register() returned an error! Always use put_device()
>> to give up the reference initialized.
>>
>> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> I do not see anything giving cls_dev an initial non-zero reference
> count before this device_register() call.
Yes, you are correct there is nothing to release (hnae_release).
>
> And I have no idea why you use a "!" when saying 'error' you this
> commit log message.
>
Sorry for that. next time I will take care.

~arvind

\
 
 \ /
  Last update: 2018-03-12 17:28    [W:0.059 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site