Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp97294ybz; Tue, 21 Apr 2020 05:29:33 -0700 (PDT) X-Google-Smtp-Source: APiQypIlcMu8M+f2GtPPPnEim+mOqGigLKhFKgjsDmdqXkrqr9Pau2Q3omeXFnnDjsOUS0l5xgsY X-Received: by 2002:a17:906:3da:: with SMTP id c26mr21046525eja.290.1587472173685; Tue, 21 Apr 2020 05:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587472173; cv=none; d=google.com; s=arc-20160816; b=aZMk6vpDXhSwszjLMjXh1P0JzJjIvKjjVhCnY7mNoOZ5lrM4kSfF2x/y4cDlnE0zp1 NxSUFCIV5kCTWQO2jjGaieu4dTzZyFmyvqnpSNr9vQP9w/pJmNs9X9qdvsfLaZnEXV1/ EY5yh1jAFxmQkDVwrpjlABKII88rx4IPnCIyNtLkfnzG5CXOA9jXFmaP/53fe1JCMPGo N78M5Qzk24QzeauQRUiuWM55EkBYWnhC+vRZf+3tzTUhezeT+rMesCS6h0T1Kew5rA0D VFmCMUnhaAvOwQqb1WakttXj0tPs0t5Yj8HgNMdtpq52ibqPVbRYOpUmZi0luSWpCszr UGhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=9K7G9b2e9+yypR9OCEXleHOAp8JU5TG/j3+6dNLf2LM=; b=xOro4xctkVYcADEUNi6S1mgn5NrDSXXA/KI9ci9+vlNxj0TVv6NH4fnAmwoTxVLQK4 Ww8noX0+1IEqOymzwtgran25i2FSetfbVoeXZ7bX2krUeSywbzgh+0QplVOjT3W9nEcM xYFIz0RSfjpQs5lu1nqqGWfau6hl9H91Q81gBfujhM+yJYFDXUWoE/1hruAQMUIVA74m CddMkW68IY4CsBKJKkRifHVgqxxKaGWPUZ7PdWocfkPH84I0UKhvzyuaL35nsMB0uxDH lHtUFuqxgRKf7I+m5rjeDCzlQClk2FfgS+1bbYAZfoe4wHF44M/hE/3yK0xi49GKmEbM 2MrA== 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 w21si1317625edt.595.2020.04.21.05.29.10; Tue, 21 Apr 2020 05:29:33 -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 S1728719AbgDUMZj (ORCPT + 99 others); Tue, 21 Apr 2020 08:25:39 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59244 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728576AbgDUMZj (ORCPT ); Tue, 21 Apr 2020 08:25:39 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A1180CA88C4FE8DFBF7B; Tue, 21 Apr 2020 20:25:36 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Tue, 21 Apr 2020 20:25:26 +0800 From: Zou Wei To: , , , , , , CC: Zou Wei Subject: [PATCH -next] tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart Date: Tue, 21 Apr 2020 20:31:46 +0800 Message-ID: <1587472306-105155-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); return -ENODEV; + } port->iotype = UPIO_MEM; port->irq = res_irq->start; -- 2.6.2