> -----Original Message-----
> From: amd-gfx [mailto:[email protected]] On Behalf
> Of Rex Zhu
> Sent: Thursday, September 08, 2016 2:05 AM
> To: [email protected]
> Cc: Zhu, Rex
> Subject: [PATCH 2/3] drm/amdgpu: fix compiler warning.
> 
> no parentheses around assignment used as truth value.
> 
> Change-Id: I6bc4b74d3838a4d0c4c7a1b46c74a5d405e76f4e
> Signed-off-by: Rex Zhu <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index f17fc6d..d497c11 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1977,7 +1977,8 @@ int amdgpu_device_resume(struct drm_device
> *dev, bool resume, bool fbcon)
>       if (resume) {
>               pci_set_power_state(dev->pdev, PCI_D0);
>               pci_restore_state(dev->pdev);
> -             if (r = pci_enable_device(dev->pdev)) {
> +             r = pci_enable_device(dev->pdev);
> +             if (r != 0) {

This can be simplified to just:
if (r) {

With that fixed:
Reviewed-by: Alex Deucher <[email protected]>

>                       if (fbcon)
>                               console_unlock();
>                       return r;
> --
> 1.9.1
> 
> _______________________________________________
> amd-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to