From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============9024176690324650234==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] mt6625l: fix eno.cocci warnings Date: Mon, 06 Jul 2020 14:41:09 +0800 Message-ID: <20200706064109.GA30888@9cf1f7d5106f> In-Reply-To: <202007061455.Nn14Bg8E%lkp@intel.com> List-Id: --===============9024176690324650234== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_dbg.c:2001= :5-11: ERROR: allocation function on line 1998 returns NULL not ERR_PTR on = failure The various basic memory allocation functions don't return ERR_PTR Generated by: scripts/coccinelle/null/eno.cocci Fixes: 5a3d075a983c ("mt6625l: include wifi-folder") Signed-off-by: kernel test robot --- tree: https://github.com/frank-w/BPI-R2-4.14 5.8-wifi head: 4b8951570a4f2ef564d134f5aa8779fd067af1c9 commit: 5a3d075a983c166a2a4294c272b47698e24c97c6 [5/11] mt6625l: include wi= fi-folder stp_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_dbg.c +++ b/drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/stp_dbg.c @@ -1998,7 +1998,7 @@ MTKSTP_DBG_T *stp_dbg_init(void *btm_hal stp_dbg =3D kzalloc(sizeof(MTKSTP_DBG_T), GFP_KERNEL); if (stp_dbg =3D=3D NULL) goto ERR_EXIT1; - if (IS_ERR(stp_dbg)) { + if (!stp_dbg) { STP_DBG_ERR_FUNC("-ENOMEM\n"); goto ERR_EXIT1; } --===============9024176690324650234==--