From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out203-205-221-210.mail.qq.com (out203-205-221-210.mail.qq.com [203.205.221.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DCAB17E9 for ; Tue, 3 May 2022 08:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1651566212; bh=NJIAh5guHFYvIB8e0zXNUzDaqjoEDhd3vxvk7zdlYu0=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=x7g10ICQWAuATr6EdxqrBO3GkHyhDccrRdJC3PZez9NRgwmFQjr0qLSCcaW4SxyVr MDb0WgE5msBLsVXU1ddAGqmYQ7tpGVRY7fFKkxJT+1fT/MgtOp0lHXrAM5bTAF3mZQ ek4zF4Qa4Lz2/8Te4UJzyiMlCBDZi5Av7VnkJPPE= Received: from helloworld ([59.172.176.225]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 59505804; Tue, 03 May 2022 16:22:21 +0800 X-QQ-mid: xmsmtpt1651566141t4gamjj7h Message-ID: X-QQ-XMAILINFO: NQR8mRxMnur98GHdWRxeREKHoJraU6N7Zpu3RFXNrcHFmccrfKmKpRC0aSHajM 0xoCCao+zyW5Uwxq05ouYTpTy4mORa4CSZ73BTVwSuh8KBADSalcwJmEmo1lkjcCzAgjXJzcQbed 0c9EssZQc+9847elFZsSqyS1aSWB4nQuQt/O3VFLQ8jl9ECsxw9PFqvEyAeCti4dbefwiXS3DuM/ oACOplW5fiO2gEEFyhdNJe3fMPjILtH2uUQjAHmV89iAHo2GjJev5x9H+7lAjUUFmP+Pb1UzF8Sf VPNFSnFQaLvi1+02Wbq3GFoeQ4NR1es5W2UAeWYvJHLY2xojObIyLLv3HgpY7LiTHhl6r+jgWZhH gSiVX8mUDNVb1CnbruIOei+U5rj4CUot2YIZzoAlZP3FvfAIkZ8CjH95iTPA8MEXSOoQ8G/3prxA azMeUIvM77R0faPsduJnRTFz5IMfGeTP4WbwogDU2MqY4hk4F+ZHF21LvEHW3UV4OYgP5joa9zIQ TZlCgyEZJUagZ05Ht+LO3m3H+IM/WEehCHe6FZEpDwYKumekzHzfW5vU8+iwwVJgTYi2JzloyKgr UVzof+3wOzwnUgHtVTK+BHcdNXwl70ejCnwzjPjVU5KPzTyuf0OmwIw99U7wbxDOBaGcw9FOLdls 7ciaUJKPI9g3Zp0F9orOzkabEScBxEhlz2oFX75av8DHtb0xeY4yrxnmYOX7XXcvey8UGI1llNeT 2ZJ4T752ljbVOsnXuInNx0qDsG7qpola0EyOTUBKgixN1ccJTPeSJB1NwTM2SiyHJE4+XbrLPlLH bE6tqvWbC3MgNTGTjTVIhwBm4+2ufrtWBqFjMzwPyDqfZik+dWuS5OU6VialilmR4j8Lh3Ze/rZ9 AlNUJfAuil0bnanKPiJ6pH+oQpishDGJf9mI2vTD60ViifHnO2+UqgHKb4cwKTOn7kuy8fZ9DZFD jWFre1zJixtyhK5hcWjjAnop6Gkkc4Iml9Jzp2kNeFyz9fSIDqiqlLnun1jkCZ From: To: Cc: , , , , References: In-Reply-To: Subject: Re: [PATCH 12/12] staging: r8188eu: check the return of kzalloc() Date: Tue, 3 May 2022 16:22:21 +0800 X-OQ-MSGID: <000701d85ec6$ea14b1f0$be3e15d0$@foxmail.com> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIV0YZsN+y1sjhn79f1inyeXg2RTwLRgsQJAVYDQBuscJ1dsA== Content-Language: zh-cn 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