lkml.org 
[lkml]   [2016]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] s5p-mfc: Don't try to put pm->clock if lookup failed
From
Date
Hello Arnd,

Thanks for your feedback.

On 05/02/2016 02:41 PM, Arnd Bergmann wrote:
> On Monday 02 May 2016 13:27:54 Javier Martinez Canillas wrote:
>> Failing to get the struct s5p_mfc_pm .clock is a non-fatal error so the
>> clock field can have a errno pointer value. But s5p_mfc_final_pm() only
>> checks if .clock is not NULL before attempting to unprepare and put it.
>>
>> This leads to the following warning in clk_put() due s5p_mfc_final_pm():
>>
>
> Better assign the pointer to NULL in case of a non-fatal error
> return code. That way, the reader doesn't have to wonder why you
> have the IS_ERR_OR_NULL() check here.
>

Ok, I'll re-spin the patch doing that instead.

> Arnd
>

Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America

\
 
 \ /
  Last update: 2016-05-02 21:41    [W:0.032 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site