[PATCH 2/3] drm/amdgpu: fix compiler warning.

Huang Rui ray.huang at amd.com
Thu Sep 8 06:47:05 UTC 2016


On Thu, Sep 08, 2016 at 02:05:16PM +0800, Rex Zhu wrote:
> no parentheses around assignment used as truth value.
> 
> Change-Id: I6bc4b74d3838a4d0c4c7a1b46c74a5d405e76f4e
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Huang Rui <ray.huang at amd.com>

> ---
>  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) {
>  			if (fbcon)
>  				console_unlock();
>  			return r;
> -- 
> 1.9.1
> 
> _______________________________________________
> 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