lkml.org 
[lkml]   [2015]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] RTC: remove unnecessary device_get() in rtc_device_unregister
On 20/07/2015 at 16:02:50 -0700, Dmitry Torokhov wrote :
> Technically the address of rtc->dev can never be NULL, so get_device()
> can never fail. Also caller of rtc_device_unregister() supposed to be
> the owner of the device and thus have a valid reference. Therefore
> call to get_device() is not needed here.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/rtc/class.c | 25 ++++++++++++-------------
> 1 file changed, 12 insertions(+), 13 deletions(-)
Applied, thanks.

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


\
 
 \ /
  Last update: 2015-07-22 23:01    [W:0.301 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site