From patchwork Sun Jan 7 11:56:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10148159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B249E6037E for ; Sun, 7 Jan 2018 11:57:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0F0D2890E for ; Sun, 7 Jan 2018 11:57:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9356628956; Sun, 7 Jan 2018 11:57:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF6EB2890E for ; Sun, 7 Jan 2018 11:57:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2269D6E50D; Sun, 7 Jan 2018 11:57:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.3]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6FDA6E50D for ; Sun, 7 Jan 2018 11:57:20 +0000 (UTC) Received: from [192.168.1.3] ([78.48.134.178]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MdYXk-1eFXKO105k-00PKHi; Sun, 07 Jan 2018 12:56:48 +0100 Subject: [PATCH v2 1/2] video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, linux-parisc@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Helge Deller , "James E. J. Bottomley" , Rolf Eike Beer References: <7dcd32b6-9691-14a1-29cf-3a746ef5adfc@users.sourceforge.net> <25624997.nONnEdNj0s@daneel.sf-tec.de> <1680261.Msdj7gi9fB@amdc3058> <889131fe-199c-3bef-0781-00761b807426@users.sourceforge.net> Message-ID: <6341951e-df28-0b40-974e-dedd890b5228@users.sourceforge.net> Date: Sun, 7 Jan 2018 12:56:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <889131fe-199c-3bef-0781-00761b807426@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:/N6DwZGB66P5uoLxdTEatpJXhoyTzmQnXY9AC+S9h6O+tob/Vo2 4AOr4RZgCsSn6wl5PC8fiNDZslznkYpEpeVTGMkvTbzyyL719c2PoxN76CUDxYHq8E9Itex V9flZgTmeTGb6a1T/dhPMLn4KloQdl7F8xDUvCYVjzwymB8Pb8jhQ8IPn5xNrglZYDNL1aL 1W/4KqcdJpDFE6ow0+Nhw== X-UI-Out-Filterresults: notjunk:1; V01:K0:0EHjd+cj20c=:mscULf6aRKHKNEaCjF0Ac5 +7ncBOR/bWZjn4CEwztRDy/sS1JXs7/xF2z85rJZBL/nCjzZ8GJFtotY3bxofagSzB9OqoPoI MSZICAEMvzL/samxLal68lWaQtfqEkb4BAWvzflYt2mBt/PTchIYlIrthZGjC9ZqLjIdDH8nK vaYSbR7krHmpkhU6UCdCTwpHAyDZZEoyAxT5n7EbZKHlL+4q7GqEC5ntPpyItw4IwzglzOY7j CDT21j89aw0PFQkBWVWV0pMUSee4h9S5CYpRQSbTrc80a34UPfnV1bu4qHWd61n2zwT2IYrqr qnV3RnmQs1tk6Vfvs8tz4+7SMOhNAtO+stL2eJhZfX0+B/fvlg1KBM4Qj726gFkoHGqYGHaNC f38bZofa8L5f+br2ns4SYN5hPKhINOFnIXlI/VcxbCSdPrx3VqwDgjlGY/96Xu/IeQjZDR0vO 9kupgfQq41kVlxQrIsUasZrQ5nrbib5EcKbhK3+2hg3H0DcktedQJhSpPBYkQHgB2Uy8GbTct 4uhvyG1Jh2nhBqTOiWOiYXkaUo0CEcBzhKpMlxTjCVd6bbXCekigldE55JatqxnjG6p8GhXGQ SKQjAZxDYMmmeQv7qdNGgFuQhHK2fyiBnItTqNDvbw96b+FaLxEx3e0uJ07renz47nmnFfcgo YGpU0W1Qg2nhyhRAUEXN3o2M0esQgkLhOGahXc+ERZWIA6X0DJvrP1Uxr0/b5LNINEyMUDmXd VeKnJQkvm4aDzAgbM7CIE9CS4k1zPKlaCBOmLyEdkBPYH7OWe+nuYywMeC5YlxuXlftcUGYc5 zMu20C/IHxIAvmpmiSnWJICFzppgOyjsNqU+sFOnsz4hpkxsAs= Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 7 Jan 2018 11:33:59 +0100 Replace an error code for the indication of a memory allocation failure in this function. Fixes: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac ("Linux-2.6.12-rc2: Initial git repository build") Suggested-by: Rolf Eike Beer Signed-off-by: Markus Elfring --- drivers/video/fbdev/stifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index 6ded5c198998..511a594889af 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -1128,7 +1128,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) fb = kzalloc(sizeof(*fb), GFP_ATOMIC); if (!fb) { printk(KERN_ERR "stifb: Could not allocate stifb structure\n"); - return -ENODEV; + return -ENOMEM; } info = &fb->info;