Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2566298ybz; Sun, 26 Apr 2020 23:21:47 -0700 (PDT) X-Google-Smtp-Source: APiQypI5d9K+C0RiCY2U5+9cvuBe7GoA4xPe3obuROfhMvbCxnqxA5z2ypLJMMdAGITkPoy3VFAT X-Received: by 2002:a05:6402:30ad:: with SMTP id df13mr17221300edb.339.1587968507441; Sun, 26 Apr 2020 23:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587968507; cv=none; d=google.com; s=arc-20160816; b=uTntgQeMpA5WlOnjZG8UEV9BcQE3iaY7NAhS62MuU9EIttBHLuVMn9kJefvbUZfjDe ymjyxTzFvuHmpE1bXCsVr97HjHDAYfqX7qCh7k7RpLQfGEoYn0Q+0KP2nZVN14yd7HZe qUe1rfUXnQfhOLCJzbCcBBVrFCjE1qafLujCpBxCzIV9Gc105mrxe3fQoEgyZB+DDJQN JZm/SK6/tx26Stw1pRUyZl9TXrfSZsM9DQnvO2m3OfLyYUYf+wW5fRrdLhK2cuWipdUg LmAXF6ER0MaKV+cTlwvd5lL3iva+RRUJmKLs5g2SIpOwC6pWj3BuuAJvcvPSfI+Lbar2 iGKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:to:subject; bh=Ka1iJwENdzfmRm0pEosTzpXLJVlwhGC9ErAsS+op7eM=; b=ANxgD8JdWzWPlPOY22bazV3oYZV/6K1r1Oz6KJOn3Q56KO/SSSgckAmuiw6reYLfdA Zu+TA6V7CGFm15NjKqLI+W3hsIhUEXGa4hlkBIrmuZex1Fs/Akmlm8s9hNcy6lHylC96 4Lk7SxU8xhNCTxmxkFo7+BCvtqQfEv5og4+SKmtIMy9B73fmfTcmOESEJDBizGKN7vN7 mlJM57u2XcnNbK7L+gk1XUFZEG/TTVkPqiWE7md2+lBOnkKsJbWujhcyGcjTaSCm6D1y r8WDIz/454DVwS8OVxVTfQTGGe3JnysE7fypDq+xsVZyAznR8+vQSOGPtuAteZpu7Jma njSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l30si8361492edl.17.2020.04.26.23.21.24; Sun, 26 Apr 2020 23:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726636AbgD0GTh (ORCPT + 99 others); Mon, 27 Apr 2020 02:19:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:43924 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbgD0GTh (ORCPT ); Mon, 27 Apr 2020 02:19:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 355C2ACC3; Mon, 27 Apr 2020 06:19:34 +0000 (UTC) Subject: Re: [PATCH -next] tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart To: Zou Wei , gregkh@linuxfoundation.org, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1587472306-105155-1-git-send-email-zou_wei@huawei.com> From: Jiri Slaby Autocrypt: addr=jslaby@suse.cz; prefer-encrypt=mutual; keydata= mQINBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA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tH6c9mT5Ng+d1sN/VTSPyfQARAQABiQIfBBgBAgAJBQJOkueGAhsM AAoJEL0lsQQGtHBJN7UQAIDvgxaW8iGuEZZ36XFtewH56WYvVUefs6+Pep9ox/9ZXcETv0vk DUgPKnQAajG/ViOATWqADYHINAEuNvTKtLWmlipAI5JBgE+5g9UOT4i69OmP/is3a/dHlFZ3 qjNk1EEGyvioeycJhla0RjakKw5PoETbypxsBTXk5EyrSdD/I2Hez9YGW/RcI/WC8Y4Z/7FS ITZhASwaCOzy/vX2yC6iTx4AMFt+a6Z6uH/xGE8pG5NbGtd02r+m7SfuEDoG3Hs1iMGecPyV XxCVvSV6dwRQFc0UOZ1a6ywwCWfGOYqFnJvfSbUiCMV8bfRSWhnNQYLIuSv/nckyi8CzCYIg c21cfBvnwiSfWLZTTj1oWyj5a0PPgGOdgGoIvVjYXul3yXYeYOqbYjiC5t99JpEeIFupxIGV ciMk6t3pDrq7n7Vi/faqT+c4vnjazJi0UMfYnnAzYBa9+NkfW0w5W9Uy7kW/v7SffH/2yFiK 9HKkJqkN9xYEYaxtfl5pelF8idoxMZpTvCZY7jhnl2IemZCBMs6s338wS12Qro5WEAxV6cjD VSdmcD5l9plhKGLmgVNCTe8DPv81oDn9s0cIRLg9wNnDtj8aIiH8lBHwfUkpn32iv0uMV6Ae sLxhDWfOR4N+wu1gzXWgLel4drkCJcuYK5IL1qaZDcuGR8RPo3jbFO7Y Message-ID: <4cd8f963-9292-faef-1e24-df90821274d6@suse.cz> Date: Mon, 27 Apr 2020 08:19:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <1587472306-105155-1-git-send-email-zou_wei@huawei.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Zou Wei > --- > 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? > return -ENODEV; > + } > > port->iotype = UPIO_MEM; > port->irq = res_irq->start; > -- js suse labs