[PATCH] drm/amdgpu: fix empty return on non-void function

Alex Deucher alexdeucher at gmail.com
Tue Feb 4 16:53:47 UTC 2020


On Tue, Feb 4, 2020 at 9:49 AM Nirmoy Das <nirmoy.aiemd at gmail.com> wrote:
>
> This fixes empty return on non-void function, amdgpu_xgmi_remove_device
>
> Fixes: b80574252499e (drm/amdgpu: move xgmi init/fini to xgmi_add/remove_device call)
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> index 78989e9560d1..490f57d6704c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> @@ -463,11 +463,11 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)
>         struct amdgpu_hive_info *hive;
>
>         if (!adev->gmc.xgmi.supported)
> -               return;
> +               return -EINVAL;
>
>         hive = amdgpu_get_xgmi_hive(adev, 1);
>         if (!hive)
> -               return;
> +               return -EINVAL;
>
>         if (!(hive->number_devices--)) {
>                 amdgpu_xgmi_sysfs_destroy(adev, hive);
> --
> 2.25.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list