From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755472AbbITN5r (ORCPT ); Sun, 20 Sep 2015 09:57:47 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:52640 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755338AbbITN5p (ORCPT ); Sun, 20 Sep 2015 09:57:45 -0400 From: Nicolas Iooss To: David Airlie , Thomas Hellstrom , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH 2/2] drm/vmwgfx: make vmw_cotable_unbind return an initialized value Date: Sun, 20 Sep 2015 15:50:57 +0200 Message-Id: <1442757057-645-2-git-send-email-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1442757057-645-1-git-send-email-nicolas.iooss_linux@m4x.org> References: <1442757057-645-1-git-send-email-nicolas.iooss_linux@m4x.org> X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sun Sep 20 15:51:43 2015 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000057, queueID=8EF031408EEE9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In vmw_cotable_unbind(), local variable ret is never initialized before being used in a return statement at the end of the function. Fix this by directly returning zero and removing the variable. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c index ce659a125f2b..092ea81eeff7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c @@ -311,7 +311,6 @@ static int vmw_cotable_unbind(struct vmw_resource *res, struct vmw_private *dev_priv = res->dev_priv; struct ttm_buffer_object *bo = val_buf->bo; struct vmw_fence_obj *fence; - int ret; if (list_empty(&res->mob_head)) return 0; @@ -328,7 +327,7 @@ static int vmw_cotable_unbind(struct vmw_resource *res, if (likely(fence != NULL)) vmw_fence_obj_unreference(&fence); - return ret; + return 0; } /** -- 2.5.2