From patchwork Fri Aug 9 17:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 11087409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1551C746 for ; Fri, 9 Aug 2019 17:40:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 032DF20587 for ; Fri, 9 Aug 2019 17:40:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C0B20415; Fri, 9 Aug 2019 17:40:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7CD4320587 for ; Fri, 9 Aug 2019 17:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yvWaOCgSDi1O1xppW0BkFQCResNxz7G31YxfmYhO6oQ=; b=PRN8AIZcd7dFBL Lx2Cr0InEfX6vVcdawIy1XMlOrysyabuDlOIQx+xzfs0ft3bmIRHtO5C+mBlU3sh7pgK1laSyoJLF 6P8UYvAAXk3MxtwSQWKzMCukTM4TM+z8o7A9vpL3sHox+4cS9A37DwEPj4BP6VUGsnKD2KzhoeHot KdaHeaTbupyiJJnik6PyTYpmDCeJWDOO+M+gl6sjmqH4+cmFOvj2uaX+HO96QklE+KoRoCaRhkl4P EjBsxydUpWdm+jbWdy7Lj2KimB/aps4zjL2PKOL5jQ/yVxeto1OeWnLDFd8lYRv5c2luSpfkYRVFK 4llmf9OO2g9KHczVqMGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hw8sl-00086O-SK; Fri, 09 Aug 2019 17:40:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hw8sj-00085w-F1 for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2019 17:40:50 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hw8sc-0001HO-HL; Fri, 09 Aug 2019 17:40:42 +0000 From: Colin King To: Richard Genoud , Greg Kroah-Hartman , Jiri Slaby , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] tty/serial: atmel: remove redundant assignment to ret Date: Fri, 9 Aug 2019 18:40:42 +0100 Message-Id: <20190809174042.6276-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190809_104049_637966_D5CFDD8C X-CRM114-Status: GOOD ( 10.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King Variable ret is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Alexandre Belloni --- drivers/tty/serial/atmel_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 0b4f36905321..19a85d6fe3d2 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -2888,7 +2888,7 @@ static int atmel_serial_probe(struct platform_device *pdev) struct atmel_uart_port *atmel_port; struct device_node *np = pdev->dev.parent->of_node; void *data; - int ret = -ENODEV; + int ret; bool rs485_enabled; BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));