linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: <xkernel.wang@foxmail.com>
To: <joe@perches.com>
Cc: <Larry.Finger@lwfinger.net>, <phil@philpotter.co.uk>,
	<gregkh@linuxfoundation.org>, <linux-staging@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 12/12] staging: r8188eu: check the return of kzalloc()
Date: Tue, 3 May 2022 16:22:21 +0800	[thread overview]
Message-ID: <tencent_8C37B90E1C06149CE1844A8CFF232048CC08@qq.com> (raw)
In-Reply-To: <f6421e8f75a030222bf9cc7ef191648f7495a511.camel@perches.com>

On Tuesday, May 3, 2022 3:09 PM +0800, joe@perches.com wrote:
> It'd be better to use the typical error returns

Hi Joe,

Thank you for your suggestion. The typical error returns will make these
codes unified with the code in other places.
But now we can not directly do that in this patch, otherwise, the original
functionality will be affected:

Apart from the returns of the error paths in _rtw_init_xmit_priv itself,
the functions on its call chain such as rtw_init_drv_sw() in
staging/r8188eu/os_dep/os_intfs.c are also sensitive to _SUCCESS or _FAIL.
If we want to unify all of them, there are a lot of changes need to do
which I think is at least beyond the purpose of this patch.

So I just keeps the form of error returns consistent with the original
logic.

Regards,
Xiaoke Wang



  reply	other threads:[~2022-05-03  8:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  6:56 [PATCH 00/12] staging: some memory-related patches xkernel.wang
2022-05-03  6:57 ` [PATCH 01/12] staging: rtl8712: fix potential memory leak in r8712_xmit_resource_alloc() xkernel.wang
2022-05-03  6:58 ` [PATCH 02/12] staging: rtl8712: fix potential memory leak in _r8712_init_xmit_priv() xkernel.wang
2022-05-03  6:58 ` [PATCH 03/12] staging: rtl8712: fix potential memory leak in r8712_init_drv_sw() xkernel.wang
2022-05-03  6:59 ` [PATCH 04/12] staging: rtl8712: change the type of _r8712_init_recv_priv() xkernel.wang
2022-05-03  6:59 ` [PATCH 05/12] staging: rtl8712: add two validation check in r8712_init_drv_sw() xkernel.wang
2022-05-03  7:00 ` [PATCH 06/12] staging: rtl8723bs: fix a potential memory leak in rtw_init_cmd_priv() xkernel.wang
2022-05-03  7:00 ` [PATCH 07/12] staging: rtl8723bs: fix potential memory leak in _rtw_init_xmit_priv() xkernel.wang
2022-05-03  7:00 ` [PATCH 08/12] staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw() xkernel.wang
2022-05-03  7:01 ` [PATCH 09/12] staging: r8188eu: fix a potential memory leak in _rtw_init_cmd_priv() xkernel.wang
2022-05-03  7:01 ` [PATCH 10/12] staging: r8188eu: fix potential memory leak in rtw_os_xmit_resource_alloc() xkernel.wang
2022-05-03  7:02 ` [PATCH 11/12] staging: r8188eu: fix potential memory leak in _rtw_init_xmit_priv() xkernel.wang
2022-05-03  7:02 ` [PATCH 12/12] staging: r8188eu: check the return of kzalloc() xkernel.wang
2022-05-03  7:08   ` Joe Perches
2022-05-03  8:22     ` xkernel.wang [this message]
2022-06-06  6:11 ` [PATCH 00/12] staging: some memory-related patches Greg KH

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=tencent_8C37B90E1C06149CE1844A8CFF232048CC08@qq.com \
    --to=xkernel.wang@foxmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /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).