From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-parisc@vger.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Helge Deller <deller@gmx.de>,
"James E. J. Bottomley" <jejb@parisc-linux.org>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb()
Date: Fri, 24 Nov 2017 22:30:34 +0100 [thread overview]
Message-ID: <25624997.nONnEdNj0s@daneel.sf-tec.de> (raw)
In-Reply-To: <7dcd32b6-9691-14a1-29cf-3a746ef5adfc@users.sourceforge.net>
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 24 Nov 2017 22:22:06 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/video/fbdev/stifb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
> index 6ded5c198998..fe217a2f7d21 100644
> --- a/drivers/video/fbdev/stifb.c
> +++ b/drivers/video/fbdev/stifb.c
> @@ -1126,10 +1126,8 @@ static int __init stifb_init_fb(struct sti_struct
> *sti, int bpp_pref) int bpp, xres, yres;
>
> fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
> - if (!fb) {
> - printk(KERN_ERR "stifb: Could not allocate stifb structure\n");
> + if (!fb)
> return -ENODEV;
> - }
>
> info = &fb->info;
This should be -ENOMEM.
Eike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-11-24 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 21:28 [PATCH] video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb() SF Markus Elfring
2017-11-24 21:30 ` Rolf Eike Beer [this message]
2017-12-29 18:05 ` Bartlomiej Zolnierkiewicz
2018-01-07 11:55 ` [PATCH v2 0/2] video/fbdev/stifb: Adjustments for stifb_init_fb() SF Markus Elfring
2018-01-07 11:56 ` [PATCH v2 1/2] video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb() SF Markus Elfring
[not found] ` <CGME20180328133411epcas2p442e8f8a85d6c6e72ec5a5122519fe5eb@epcas2p4.samsung.com>
2018-03-28 13:34 ` Bartlomiej Zolnierkiewicz
2018-01-07 11:58 ` [PATCH v2 2/2] video/fbdev/stifb: Delete an error message for a failed memory allocation " SF Markus Elfring
[not found] ` <CGME20180328133621epcas2p2865976351cf3dc28ac258d2c9530ffcd@epcas2p2.samsung.com>
2018-03-28 13:36 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25624997.nONnEdNj0s@daneel.sf-tec.de \
--to=eike-kernel@sf-tec.de \
--cc=b.zolnierkie@samsung.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=elfring@users.sourceforge.net \
--cc=jejb@parisc-linux.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).