Re: [PATCH] drm/amdgpu/acpi: NULL check before some freeing functions is not needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Applied.  thanks!

Alex
On Wed, Dec 5, 2018 at 2:02 PM Lyude Paul <lyude@xxxxxxxxxx> wrote:
>
> Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx>
>
> Thanks!
>
> On Wed, 2018-12-05 at 15:43 +0800, Wen Yang wrote:
> > kfree(NULL) is safe, so removes NULL check before freeing the mem.
> > This patch also fix the ifnullfree.cocci warnings.
> >
> > Signed-off-by: Wen Yang <wen.yang99@xxxxxxxxxx>
> > CC: Alex Deucher <alexander.deucher@xxxxxxx>
> > CC: christian.koenig@xxxxxxx
> > CC: "David (ChunMing) Zhou" <David1.Zhou@xxxxxxx>
> > CC: David Airlie <airlied@xxxxxxxx> (maintainer:DRM DRIVERS)
> > CC: Lyude Paul <lyude@xxxxxxxxxx>
> > CC: Rex Zhu <Rex.Zhu@xxxxxxx>
> > CC: Jim Qu <Jim.Qu@xxxxxxx>
> > CC: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> > CC: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > index 7f0afc526419..996bfce149f2 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > @@ -816,6 +816,5 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
> >  void amdgpu_acpi_fini(struct amdgpu_device *adev)
> >  {
> >       unregister_acpi_notifier(&adev->acpi_nb);
> > -     if (adev->atif)
> > -             kfree(adev->atif);
> > +     kfree(adev->atif);
> >  }
> --
> Cheers,
>         Lyude Paul
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux