Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753574AbeAGL5Z (ORCPT + 1 other); Sun, 7 Jan 2018 06:57:25 -0500 Received: from mout.web.de ([212.227.15.3]:62168 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752928AbeAGL5X (ORCPT ); Sun, 7 Jan 2018 06:57:23 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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; -- 2.15.1