From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754859AbcDALD6 (ORCPT ); Fri, 1 Apr 2016 07:03:58 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:30436 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbcDALD4 (ORCPT ); Fri, 1 Apr 2016 07:03:56 -0400 Date: Fri, 1 Apr 2016 14:03:30 +0300 From: Dan Carpenter To: David Airlie Cc: Ben Skeggs , Ilia Mirkin , Pekka Enberg , Andrew Morton , Sudip Mukherjee , Alexandre Courbot , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] drm/nouveau/gem: silence uninitialized variable warning Message-ID: <20160401110330.GB6048@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The static checker checker is warning that we could hit the first continue; on every iteration through the loop and never initialize "ret". It seems unlikely but we may as well silence the warning. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index a0865c4..fd36b24 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -370,7 +370,8 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_device *dev = chan->drm->dev; int trycnt = 0; - int ret, i; + int ret = -ENOENT; + int i; struct nouveau_bo *res_bo = NULL; LIST_HEAD(gart_list); LIST_HEAD(vram_list);