video: udlfb: Remove unnecessary local variable
authorLadislav Michl <ladis@linux-mips.org>
Mon, 15 Jan 2018 16:04:21 +0000 (17:04 +0100)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 15 Jan 2018 16:04:21 +0000 (17:04 +0100)
'urb' is not needed and can be removed.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/udlfb.c

index 99ce445986b3299250d5da94c2a8c023aa58fb5f..5f68f8c720ecf5883a3408d05a9fe63cd8e30b72 100644 (file)
@@ -1919,7 +1919,6 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dev)
        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 +1927,7 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dev)
                atomic_set(&dev->lost_pixels, 1);
                pr_warn("wait for urb interrupted: %x available: %d\n",
                       ret, dev->urbs.available);
-               goto error;
+               return NULL;
        }
 
        spin_lock_irqsave(&dev->urbs.lock, flags);
@@ -1941,10 +1940,7 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dev)
        spin_unlock_irqrestore(&dev->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 *dev, struct urb *urb, size_t len)