From patchwork Tue May 9 21:30:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 9718987 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 0AA5560237 for ; Tue, 9 May 2017 21:53:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5AD528471 for ; Tue, 9 May 2017 21:52:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7F93284DA; Tue, 9 May 2017 21:52:59 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable 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 62EAC28471 for ; Tue, 9 May 2017 21:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750803AbdEIVw6 (ORCPT ); Tue, 9 May 2017 17:52:58 -0400 Received: from gateway30.websitewelcome.com ([192.185.149.4]:38938 "EHLO gateway30.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbdEIVw5 (ORCPT ); Tue, 9 May 2017 17:52:57 -0400 X-Greylist: delayed 1351 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 May 2017 17:52:57 EDT Received: from cm5.websitewelcome.com (cm5.websitewelcome.com [108.167.139.22]) by gateway30.websitewelcome.com (Postfix) with ESMTP id D6F4F156A8 for ; Tue, 9 May 2017 16:30:23 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cm5.websitewelcome.com with id JMWN1v00R0V9LXg01MWPag; Tue, 09 May 2017 16:30:23 -0500 Received: from [189.152.179.233] (port=57404 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1d8Ci6-000WY6-CF; Tue, 09 May 2017 16:30:22 -0500 Date: Tue, 9 May 2017 16:30:21 -0500 From: "Gustavo A. R. Silva" To: Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Wolfram Sang , Greg Kroah-Hartman , Julia Lawall , Sakari Ailus Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] media: usb: au0828: remove dead code Message-ID: <20170509213021.GA4486@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.179.233 X-Exim-ID: 1d8Ci6-000WY6-CF X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.179.233]:57404 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 8 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Local variable _ret_ is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 112968 Signed-off-by: Gustavo A. R. Silva --- drivers/media/usb/au0828/au0828-video.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 16f9125..abc80b0 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c @@ -809,16 +809,10 @@ static void au0828_analog_stream_reset(struct au0828_dev *dev) */ static int au0828_stream_interrupt(struct au0828_dev *dev) { - int ret = 0; - dev->stream_state = STREAM_INTERRUPT; if (test_bit(DEV_DISCONNECTED, &dev->dev_state)) return -ENODEV; - else if (ret) { - set_bit(DEV_MISCONFIGURED, &dev->dev_state); - dprintk(1, "%s device is misconfigured!\n", __func__); - return ret; - } + return 0; }