From: Markus Elfring Subject: Re: drm/amdgpu: Delete an unnecessary check before two function calls Date: Wed, 4 Sep 2019 19:11:33 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , Chunming Zhou , Dan Carpenter , Daniel Vetter , David Airlie , Hawking Zhang , Jack Xiao , Kevin Wang , Tom St Denis , Wang Xiayang Cc: LKML , kernel-janitors@vger.kernel.org List-Id: amd-gfx.lists.freedesktop.org > The functions =E2=80=9Cdebugfs_remove=E2=80=9D and =E2=80=9Ckfree=E2=80= =9D test whether their argument > is NULL and then return immediately. > Thus the tests around the shown calls are not needed. > > This issue was detected by using the Coccinelle software. I suggest to take another look at a similar patch. drm/amdgpu: remove the redundant null check https://lkml.org/lkml/2019/9/3/59 https://lore.kernel.org/patchwork/patch/1123118/ https://lore.kernel.org/r/1567491305-18320-1-git-send-email-zhongjiang@hua= wei.com/ Regards, Markus