[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160721062543.GA1664@katana>
Date: Thu, 21 Jul 2016 08:25:43 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc: Julia Lawall <julia.lawall@...6.fr>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 3/9] staging: ks7010: Return directly after a failed
kmalloc()
On Wed, Jul 20, 2016 at 08:40:11PM +0200, SF Markus Elfring wrote:
> >>> @@ -713,10 +713,8 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
> >>> unsigned char *data_buf;
> >>>
> >>> data_buf = kmalloc(sizeof(u32), GFP_KERNEL);
> >>> - if (!data_buf) {
> >>> - rc = 1;
> >>> - goto error_out;
> >>> - }
> >>> + if (!data_buf)
> >>> + return 1;
> >>
> >> One could rather wonder why the function has such strange error values...
> >
> > Agreed. Markus, can you check if we can use -ENOMEM in those places.
>
> I find that I do not know this software good enough at the moment
> so that I could safely decide on the shown special error values.
> I guess that further clarification might be needed for affected
> implementation details.
That's OK, too.
Acked-by: Wolfram Sang <wsa@...-dreams.de>
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists