Re: [PATCH -next] tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/28/2020 4:18 AM, Greg KH wrote:
> On Mon, Apr 27, 2020 at 10:29:58AM -0700, Florian Fainelli wrote:
>>
>>
>> On 4/26/2020 11:19 PM, Jiri Slaby wrote:
>>> On 21. 04. 20, 14:31, Zou Wei wrote:
>>>> This patch fixes below error reported by coccicheck
>>>>
>>>> drivers/tty/serial/bcm63xx_uart.c:848:2-8: ERROR: missing clk_put;
>>>> clk_get on line 842 and execution via conditional on line 846
>>>>
>>>> Fixes: ab4382d27412 ("tty: move drivers/serial/ to drivers/tty/serial/")
>>>> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
>>>> Signed-off-by: Zou Wei <zou_wei@xxxxxxxxxx>
>>>> ---
>>>>  drivers/tty/serial/bcm63xx_uart.c | 4 +++-
>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
>>>> index 5674da2..ed0aa5c 100644
>>>> --- a/drivers/tty/serial/bcm63xx_uart.c
>>>> +++ b/drivers/tty/serial/bcm63xx_uart.c
>>>> @@ -843,8 +843,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
>>>>  	if (IS_ERR(clk) && pdev->dev.of_node)
>>>>  		clk = of_clk_get(pdev->dev.of_node, 0);
>>>>  
>>>> -	if (IS_ERR(clk))
>>>> +	if (IS_ERR(clk)) {
>>>> +		clk_put(clk);
>>>
>>> Why would you want to put an erroneous clk?
>>
>> Doh, somehow I completely missed, you are right this does not look legit.
> 
> Ugh, can you send a revert for this please?

Yes, now done:

https://lore.kernel.org/linux-arm-kernel/20200501013904.1394-1-f.fainelli@xxxxxxxxx/
-- 
Florian



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux