From patchwork Tue Mar 14 07:51:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 9622621 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 5F91A60424 for ; Tue, 14 Mar 2017 07:52:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F4B120700 for ; Tue, 14 Mar 2017 07:52:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43ED026E73; Tue, 14 Mar 2017 07:52:22 +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 172F720700 for ; Tue, 14 Mar 2017 07:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbdCNHwU (ORCPT ); Tue, 14 Mar 2017 03:52:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:27378 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750891AbdCNHwT (ORCPT ); Tue, 14 Mar 2017 03:52:19 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v2E7qDix019445 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2017 07:52:13 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v2E7qCCV010585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Mar 2017 07:52:13 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v2E7qAEd021549; Tue, 14 Mar 2017 07:52:11 GMT Received: from mwanda (/154.0.138.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Mar 2017 00:52:09 -0700 Date: Tue, 14 Mar 2017 10:51:50 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab , Alan Cox Cc: Greg Kroah-Hartman , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org Subject: [patch] staging/atomisp: silence uninitialized variable warnings Message-ID: <20170314075150.GA6111@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Source-IP: userv0022.oracle.com [156.151.31.74] 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 These print an uninitialized value for "opt". Let's just remove the printk. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c index 327a5c535fab..7f7c6d5133d2 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c @@ -128,11 +128,9 @@ static ssize_t iunit_dbgfun_store(struct device_driver *drv, const char *buf, unsigned int opt; int ret; - if (kstrtouint(buf, 10, &opt)) { - dev_err(atomisp_dev, "%s setting %d value invalid\n", - __func__, opt); - return -EINVAL; - } + ret = kstrtouint(buf, 10, &opt); + if (ret) + return ret; ret = atomisp_set_css_dbgfunc(iunit_debug.isp, opt); if (ret) @@ -154,11 +152,9 @@ static ssize_t iunit_dbgopt_store(struct device_driver *drv, const char *buf, unsigned int opt; int ret; - if (kstrtouint(buf, 10, &opt)) { - dev_err(atomisp_dev, "%s setting %d value invalid\n", - __func__, opt); - return -EINVAL; - } + ret = kstrtouint(buf, 10, &opt); + if (ret) + return ret; iunit_debug.dbgopt = opt; ret = iunit_dump_dbgopt(iunit_debug.isp, iunit_debug.dbgopt);