From patchwork Mon Dec 11 21:41:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10105819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F24D60751 for ; Mon, 11 Dec 2017 21:41:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AA3D29915 for ; Mon, 11 Dec 2017 21:41:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E0EE2991E; Mon, 11 Dec 2017 21:41:30 +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=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01A1829915 for ; Mon, 11 Dec 2017 21:41:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512AbdLKVl3 (ORCPT ); Mon, 11 Dec 2017 16:41:29 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:41764 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbdLKVl3 (ORCPT ); Mon, 11 Dec 2017 16:41:29 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990793AbdLKVl2EZB7p (ORCPT ); Mon, 11 Dec 2017 22:41:28 +0100 Date: Mon, 11 Dec 2017 22:41:27 +0100 From: Ladislav Michl To: linux-fbdev@vger.kernel.org Cc: Bernie Thompson , Bartlomiej Zolnierkiewicz Subject: [PATCH 3/6] video: udlfb: Remove unnecessary local variable Message-ID: <20171211214127.GD29173@lenoch> References: <20171211213948.GA29173@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171211213948.GA29173@lenoch> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'urb' is not needed and can be removed. Signed-off-by: Ladislav Michl --- drivers/video/fbdev/udlfb.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 4abf538c9b72..f74facaed8cc 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1919,7 +1918,6 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dlfb) int ret; struct list_head *entry; struct urb_node *unode; - struct urb *urb = NULL; unsigned long flags; /* Wait for an in-flight buffer to complete and get re-queued */ @@ -1928,7 +1926,7 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dlfb) atomic_set(&dlfb->lost_pixels, 1); pr_warn("wait for urb interrupted: %x available: %d\n", ret, dlfb->urbs.available); - goto error; + return NULL; } spin_lock_irqsave(&dlfb->urbs.lock, flags); @@ -1941,10 +1939,7 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dlfb) spin_unlock_irqrestore(&dlfb->urbs.lock, flags); unode = list_entry(entry, struct urb_node, entry); - urb = unode->urb; - -error: - return urb; + return unode->urb; } static int dlfb_submit_urb(struct dlfb_data *dlfb, struct urb *urb, size_t len)