Content-Type: multipart/mixed; boundary="===============2692802998372868215==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] Soundwire: intel_init: fix ifnullfree.cocci warnings Date: Fri, 31 Jan 2020 15:41:18 +0100 Message-ID: List-Id: --===============2692802998372868215== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot NULL check before kfree is not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 89a76a6409ca ("Soundwire: intel_init: add sdw adr info to sdw_intel_= ctx") CC: Bard Liao Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://github.com/thesofproject/linux sdw/master_framework head: 9fd32a3b5f5cef8953999dc060d4193d96fce64a commit: 89a76a6409cac50edbdce778418d6688ad06b63a [61/89] Soundwire: intel_i= nit: add sdw adr info to sdw_intel_ctx :::::: branch date: 31 hours ago :::::: commit date: 2 weeks ago intel_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/soundwire/intel_init.c +++ b/drivers/soundwire/intel_init.c @@ -80,8 +80,7 @@ static int sdw_intel_cleanup(struct sdw_ kfree(ctx->links); ctx->links =3D NULL; - if (ctx->ids) - kfree(ctx->ids); + kfree(ctx->ids); ctx->ids =3D NULL; return 0; --===============2692802998372868215==--