From patchwork Sat May 31 23:10:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4279521 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2764CBEEA7 for ; Mon, 2 Jun 2014 00:52:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 258D5203B0 for ; Mon, 2 Jun 2014 00:52:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D20320397 for ; Mon, 2 Jun 2014 00:52:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3CE86E4A0; Sun, 1 Jun 2014 17:52:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 454B36E172 for ; Sat, 31 May 2014 16:09:12 -0700 (PDT) Received: by mail-we0-f176.google.com with SMTP id q59so3583121wes.35 for ; Sat, 31 May 2014 16:09:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Mx2x//8aUzQFxMBF39yPViU2pGwssIb8q9P6krdpWAQ=; b=JpHdpLrvIzwzLz1f12+zmC9vNql0aLddKeTiwpPHH+Uh9gEGa5xXPWTpWTVDC+v/X2 50J2Xg9c0QSGiUeAXT5R05NwAk6TQnY0x7lYx+rZsAMXjQI0shP6e6lcpBA9yLxuuyZV b41BuGThykCZfyvWPkgyOtjQGu4gzVgF7Vz9dGDFG6mxTipJ7bYBG+flXxb97yx+vURR 4cGIyDwQsYGxCa+zLE16iTyjgeEzJ9vmbJKwYR/utDRM74DX3oDoxQn/c9I3wgmNw9R7 1oicP4dH7lK067RuV9qtNURxtYrpAkngapG+KqADigyFd7JDgkLFmwwVx0OE5DANqxNb BPRA== X-Gm-Message-State: ALoCoQkBvvajTaaL2zgqVPFp6DDOdSZ1ZzHKsLAxEpA9d98SZmsbLAqmZmGqisyntA4KkQ4U5BAv X-Received: by 10.194.24.36 with SMTP id r4mr36603571wjf.39.1401577751928; Sat, 31 May 2014 16:09:11 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id gi8sm18423439wib.8.2014.05.31.16.09.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 May 2014 16:09:11 -0700 (PDT) From: Rickard Strandqvist To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH] gpu: drm: radeon: r600_cp.c: Cleaning up uninitialized variables Date: Sun, 1 Jun 2014 01:10:05 +0200 Message-Id: <1401577805-4609-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-Mailman-Approved-At: Sun, 01 Jun 2014 17:52:06 -0700 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rickard Strandqvist X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/radeon/r600_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 8c9b7e2..0770ad6 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -2615,7 +2615,7 @@ int r600_cs_legacy_ioctl(struct drm_device *dev, void *data, struct drm_file *fp struct drm_radeon_cs *cs = data; struct drm_buf *buf; unsigned family; - int l, r = 0; + int l = 0, r = 0; u32 *ib, cs_id = 0; if (dev_priv == NULL) {