From patchwork Thu Jul 3 19:16:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4476631 Return-Path: X-Original-To: patchwork-linux-fbdev@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 B013DBEEAA for ; Thu, 3 Jul 2014 19:15:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5F14203B4 for ; Thu, 3 Jul 2014 19:15:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FEB42022A for ; Thu, 3 Jul 2014 19:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497AbaGCTPA (ORCPT ); Thu, 3 Jul 2014 15:15:00 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:59066 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbaGCTPA (ORCPT ); Thu, 3 Jul 2014 15:15:00 -0400 Received: by mail-wi0-f179.google.com with SMTP id cc10so2765558wib.6 for ; Thu, 03 Jul 2014 12:14:58 -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=oi3+56AXqY9+a7zzlf5aBAs25w6/4Y85+XFP6pJ0K/M=; b=J5JVm32Yja/+LbgG1pmlICP0wGrNLodTpSPH7Rh+ZLASFmpq67hO2j+NbV44zKor+y QQ4NsVt0mPxHIBQbtLASKg4nSq2rvxvX7fw+WKIHaPIDZGjDazDJ0esYEa8tenM6Pune zKA+SJPZO6+D2j7lapqom2WTEPFKk3ONccFq6JZ7w1Eg5D8FV/xUv7nuDbuTRsB2j2ap jmkyjpe+Xzdn4cR/7UTd+9b05SJMmkCVnAW+fYJv1F4iAZViwQSQC78zxsUxc0uqVR4+ VPelUAOOFWzCtt3XLqYaNEiRhkrR3f+4+WWnO/483fAlYj+Cdz/VjhDOhC5r+bNyuiR7 AEMw== X-Gm-Message-State: ALoCoQmu+J+OtZ8adaBDnHTnqi+eX9nrQCnpno2Coa5YO57QGwFfy0Xlid67ePz+ZZCb/wPgwHog X-Received: by 10.180.14.33 with SMTP id m1mr27906221wic.50.1404414898291; Thu, 03 Jul 2014 12:14:58 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id gh16sm70181115wic.3.2014.07.03.12.14.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jul 2014 12:14:57 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Alexandru Juncu , Mikulas Patocka , Daniel Vetter , Joe Perches , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2] video: fbdev: matrox: matroxfb_base.c: Cleaning up a null pointer checks that could never happen Date: Thu, 3 Jul 2014 21:16:13 +0200 Message-Id: <1404414974-9676-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, 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 Removal of null pointer checks that could never happen Signed-off-by: Rickard Strandqvist Acked-by: Mikulas Patocka --- drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index 7116c53..cd9dc88 100644 --- a/drivers/video/fbdev/matrox/matroxfb_base.c +++ b/drivers/video/fbdev/matrox/matroxfb_base.c @@ -1973,7 +1973,7 @@ static void matroxfb_register_device(struct matrox_fb_info* minfo) { for (drv = matroxfb_driver_l(matroxfb_driver_list.next); drv != matroxfb_driver_l(&matroxfb_driver_list); drv = matroxfb_driver_l(drv->node.next)) { - if (drv && drv->probe) { + if (drv->probe) { void *p = drv->probe(minfo); if (p) { minfo->drivers_data[i] = p;