From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81AF7C433B4 for ; Fri, 21 May 2021 12:54:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 475C66101B for ; Fri, 21 May 2021 12:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 475C66101B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2AE86E4FE; Fri, 21 May 2021 12:54:18 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C39E6E4FE for ; Fri, 21 May 2021 12:54:17 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id E10FD60FEE; Fri, 21 May 2021 12:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621601657; bh=BD4wTuQPIxItsa6Cujs6ISBIpsLi0+lXyF4Ny/3AnN0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h6mSH0CxaEQFEayJFhlghOdEOUn/drwHIUEZG/gmy7wtc08bf6cD/G1e8oGdhM3bQ BfruQqYo0eYcbeK0KroOJ/uSb3MX3X9I6uLtPrHv7PcbD6T3c5ux1RsOwlgOD7KKna C40sfd6rnnoORKhtPXGkfpoqYroMSI1wVIo6fDb4= Date: Fri, 21 May 2021 14:54:13 +0200 From: Greg Kroah-Hartman To: Dan Carpenter Subject: Re: [PATCH] hgafb: fix probe function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org, Ferenc Bakonyi , linux-nvidia@lists.surfsouth.com, Igor Matheus Andrade Torrente Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, May 17, 2021 at 11:50:32AM +0300, Dan Carpenter wrote: > There is a reversed if statement in this probe function so the driver is > completely broken. > > Fixes: dc13cac4862c ("video: hgafb: fix potential NULL pointer dereference") > Signed-off-by: Dan Carpenter > --- > drivers/video/fbdev/hgafb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c > index cc8e62ae93f6..bd3d07aa4f0e 100644 > --- a/drivers/video/fbdev/hgafb.c > +++ b/drivers/video/fbdev/hgafb.c > @@ -558,7 +558,7 @@ static int hgafb_probe(struct platform_device *pdev) > int ret; > > ret = hga_card_detect(); > - if (!ret) > + if (ret) > return ret; > > printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n", > -- > 2.30.2 > Someone _just_ beat you to this: https://lore.kernel.org/r/20210516192714.25823-1-mail@anirudhrb.com I'll add your s-o-b to that one as it's identical to yours. thanks, greg k-h