From patchwork Wed Jul 23 21:20:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4613171 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AA2A49F295 for ; Wed, 23 Jul 2014 21:19:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4D24201C8 for ; Wed, 23 Jul 2014 21:19:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 18DA2201C7 for ; Wed, 23 Jul 2014 21:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933729AbaGWVTH (ORCPT ); Wed, 23 Jul 2014 17:19:07 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:52857 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933727AbaGWVTF (ORCPT ); Wed, 23 Jul 2014 17:19:05 -0400 Received: by mail-wg0-f42.google.com with SMTP id l18so1727436wgh.1 for ; Wed, 23 Jul 2014 14:19:03 -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=46NfJTL0Ki6TkhBTk1Dym1O2zfPaa12k3O8sWCJfbgk=; b=iom6EIOAUl3ItZL/ACd95ypabkFGoUW0HzEtWsgBtN+DYLEXDda5f1kJTGAFjuLoAg teixNhhNykJ5kvgcW1YPLCEUeYcfmXl3pg7ZiL3frdYCQEm9yzsRXioX50sN1Okhws8l GcFeVaE3HVZwW2/iYDxtla5+kFOZyPzhfU3uHhaioUtMK/8eMk0sEf4hex2VhVs1bn5g GKl9hNvNcAiT/lNWzl2jot4ZtyiIRha1YXZ1G1U36V2s0SqSHufuKXrJaq58Er10PFrk Lj6oHdlJddijDOwd/bFFWldZgeIRbWuw2IDDbMj5twLLg2aSwJcrycTVMn/z05feBJCn 9DKg== X-Gm-Message-State: ALoCoQk/g1xcXdAnJNKJeIUV9BoQnzafXP7tIhybppSwwy3b78UW0USk2j+uHP+c99VtRe44iRTV X-Received: by 10.194.90.79 with SMTP id bu15mr5631844wjb.17.1406150343399; Wed, 23 Jul 2014 14:19:03 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id q11sm13726769wib.14.2014.07.23.14.19.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jul 2014 14:19:02 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Wang YanQing , Jingoo Han , David Fries , Greg Kroah-Hartman , Joe Perches , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] video: fbdev: uvesafb.c: Added additional error checking Date: Wed, 23 Jul 2014 23:20:27 +0200 Message-Id: <1406150427-26077-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Variable was assigned a value that is never used. Now the variable is used, and the function returns if a call to uvesafb_exec() returns a error. Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/uvesafb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index 509d452..47c2d74 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -561,6 +561,8 @@ static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task, task->t.regs.eax = 0x4f0a; task->t.regs.ebx = 0x0; err = uvesafb_exec(task); + if (err) + return err; if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) { par->pmi_setpal = par->ypan = 0;