Content-Type: multipart/mixed; boundary="===============8163146657670215512==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] objtool, perf: fix ifnullfree.cocci warnings Date: Fri, 10 Jan 2020 13:43:40 +0100 Message-ID: List-Id: --===============8163146657670215512== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot NULL check before some freeing functions is not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 4864b0702653 ("objtool, perf: Fix GCC 8 -Wrestrict error") CC: Josh Poimboeuf Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 head: 58ce54880a03d9c27327434ba15281f5a7139671 commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix= GCC 8 -Wrestrict error :::::: branch date: 29 hours ago :::::: commit date: 9 weeks ago Please take the patch only if it's a positive warning. Thanks! elevator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/block/elevator.c +++ b/block/elevator.c @@ -846,8 +846,7 @@ int elv_register(struct elevator_type *e spin_lock(&elv_list_lock); if (elevator_find(e->elevator_name)) { spin_unlock(&elv_list_lock); - if (e->icq_cache) - kmem_cache_destroy(e->icq_cache); + kmem_cache_destroy(e->icq_cache); return -EBUSY; } list_add_tail(&e->list, &elv_list); --===============8163146657670215512==--