From patchwork Sun Jun 7 23:02:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 6562451 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2547B9F326 for ; Sun, 7 Jun 2015 23:02:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 30CC92053E for ; Sun, 7 Jun 2015 23:02:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 329DD2052F for ; Sun, 7 Jun 2015 23:02:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751043AbbFGXCv (ORCPT ); Sun, 7 Jun 2015 19:02:51 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:34046 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbbFGXCu (ORCPT ); Sun, 7 Jun 2015 19:02:50 -0400 Received: by lbcmx3 with SMTP id mx3so70501385lbc.1 for ; Sun, 07 Jun 2015 16:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type:mime-version :content-transfer-encoding; bh=FOhdcau/vPhWknd4gBdTjF3HTUuCOrcf0PO8Tv3afPI=; b=A0ReaOMGCAyJFC64GVmSukUZn7Fqac0SheElMuq0GoZwuLBehAM8RlKJXF6xOSXJYB 1QfLaqHPLpfcrrQZviGenXcdBQq+JaRkLZAXblDscR4JsK7CIajuRWyzTwbEgb4ewFDS uBIxPdsgHq6Tpc54EIFZLdPNyOLc51UCW47vo2ilbmItLSAeGUGqjYmKT0Y5leXNJlFC oJ7pWFrr6L+hZEhZdf7W9d0FuGh3i46A1GpPEEfDW5CQpHi/NdvJd/vTVvcDq+G0fX/l LvhzxPpNgZuSlXtgWJTvLqZo349Cuv87XfOHrW6CgqUtyPrGxPBXzNPof4p35G/1HPwO zLzA== X-Received: by 10.152.3.199 with SMTP id e7mr14247332lae.78.1433718169011; Sun, 07 Jun 2015 16:02:49 -0700 (PDT) Received: from [172.17.46.147] ([194.186.53.88]) by mx.google.com with ESMTPSA id c5sm205729lbd.49.2015.06.07.16.02.47 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Sun, 07 Jun 2015 16:02:48 -0700 (PDT) Message-ID: <1433718167.8234.4.camel@mtux> Subject: [PATCH] fbdev: udlfb: remove unneeded initialization in few places From: Alexey Klimov To: linux-fbdev@vger.kernel.org, bernie@plugable.com, tomi.valkeinen@ti.com Cc: plagnioj@jcrosoft.com, klimov.linux@gmail.com Date: Mon, 08 Jun 2015 02:02:47 +0300 X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, T_DKIM_INVALID, T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Small minor cleanup. This patch removes unneeded initializations of variables in few places in different functions and one empty line. Signed-off-by: Alexey Klimov --- drivers/video/fbdev/udlfb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index ff2b873..e9c2f7b 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -279,7 +279,7 @@ static int dlfb_set_video_mode(struct dlfb_data *dev, { char *buf; char *wrptr; - int retval = 0; + int retval; int writesize; struct urb *urb; @@ -1505,8 +1505,7 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dev, char *desc; char *buf; char *desc_end; - - int total_len = 0; + int total_len; buf = kzalloc(MAX_VENDOR_DESCRIPTOR_SIZE, GFP_KERNEL); if (!buf) @@ -1582,7 +1581,7 @@ static int dlfb_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) { struct usb_device *usbdev; - struct dlfb_data *dev = NULL; + struct dlfb_data *dev; int retval = -ENOMEM; /* usb initialization */ @@ -1665,7 +1664,6 @@ static void dlfb_init_framebuffer_work(struct work_struct *work) /* allocates framebuffer driver structure, not framebuffer memory */ info = framebuffer_alloc(0, dev->gdev); if (!info) { - retval = -ENOMEM; pr_err("framebuffer_alloc failed\n"); goto error; } @@ -1912,7 +1910,7 @@ static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size) static struct urb *dlfb_get_urb(struct dlfb_data *dev) { - int ret = 0; + int ret; struct list_head *entry; struct urb_node *unode; struct urb *urb = NULL;