From patchwork Wed Jul 2 22:08:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4468241 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 4DE639F390 for ; Wed, 2 Jul 2014 22:08:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76D202039E for ; Wed, 2 Jul 2014 22:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E24220304 for ; Wed, 2 Jul 2014 22:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbaGBWHx (ORCPT ); Wed, 2 Jul 2014 18:07:53 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:41765 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbaGBWHX (ORCPT ); Wed, 2 Jul 2014 18:07:23 -0400 Received: by mail-wg0-f44.google.com with SMTP id x13so11479525wgg.3 for ; Wed, 02 Jul 2014 15:07:21 -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:in-reply-to :references; bh=310xrM94EDO31Vg1rvR0DBNP7zYALocLZEJR9NfnAJk=; b=YeO/vpDjvC7Xf2PH/J537E8+TITpxm9U4FSw7SpI1+4iovGKctN5IJBjXIF9NcQ5hk JlbWcd9eb4gBpFz3A2TLpzImMdUgxvlptz2YqR7r2dW6NMAd1p8xt4jbfxDHCms1hRR2 IADbUjEn/3EPdeIe62bbCMIZ0/2GkOKWi/Plq8mps320e+0gaD+7VAUHwAexXif5nq5g tS5Y39L+xkdh3L9hfmrYGVGRxMkmJHASe7U2dvirHW6cXV1HPzwrOARsmxfkH/J0UFYH cy7qPix+RCgStIh0MOyfCBQXVZvrbbrAJ5GOo+s9YR7ysbgJ/N4oPT/jpofwejU2erkf ihyA== X-Gm-Message-State: ALoCoQnfXqTdn6hDMaYLWQ7C0EZtzU2AvHOEycXUexTcDaWXxB/wzSX3gGegKWxlv++7fTZ3ahmQ X-Received: by 10.180.88.194 with SMTP id bi2mr6655979wib.71.1404338841876; Wed, 02 Jul 2014 15:07:21 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id dj11sm59610351wid.21.2014.07.02.15.07.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jul 2014 15:07:21 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sis: init301.c: Cleaning up a potential division by zero Date: Thu, 3 Jul 2014 00:08:35 +0200 Message-Id: <1404338915-6946-2-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404338915-6946-1-git-send-email-rickard_strandqvist@spectrumdigital.se> References: <1404338915-6946-1-git-send-email-rickard_strandqvist@spectrumdigital.se> 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, T_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 Cleaning up a potential division by zero. Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/sis/init301.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c index a89e3ca..730be06 100644 --- a/drivers/video/fbdev/sis/init301.c +++ b/drivers/video/fbdev/sis/init301.c @@ -5351,7 +5351,7 @@ SiS_SetGroup1_LVDS(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned s { unsigned short modeflag, resinfo = 0; unsigned short push2, tempax, tempbx, tempcx, temp; - unsigned int tempeax = 0, tempebx, tempecx, tempvcfact = 0; + unsigned int tempeax = 0, tempebx, tempecx, tempvcfact = 1; bool islvds = false, issis = false, chkdclkfirst = false; #ifdef CONFIG_FB_SIS_300 unsigned short crt2crtc = 0;