diff mbox

pcie: fix improper use of negative value

Message ID 1416473754-8660-1-git-send-email-arei.gonglei@huawei.com
State New
Headers show

Commit Message

Gonglei (Arei) Nov. 20, 2014, 8:55 a.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 hw/pci/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake Nov. 21, 2014, 12:01 a.m. UTC | #1
On 11/20/2014 01:55 AM, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  hw/pci/pcie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

adding qemu-trivial in cc.  This is a candidate for 2.2.

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
> index 58455bd..2902f7d 100644
> --- a/hw/pci/pcie.c
> +++ b/hw/pci/pcie.c
> @@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,
>          /* the slot is electromechanically locked.
>           * This error is propagated up to qdev and then to HMP/QMP.
>           */
> -        error_setg_errno(errp, -EBUSY, "slot is electromechanically locked");
> +        error_setg_errno(errp, EBUSY, "slot is electromechanically locked");
>      }
>  }
>  
>
Gonglei (Arei) Nov. 21, 2014, 12:34 a.m. UTC | #2
On 2014/11/21 8:01, Eric Blake wrote:

> On 11/20/2014 01:55 AM, arei.gonglei@huawei.com wrote:
>> From: Gonglei <arei.gonglei@huawei.com>
>>
>> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>> ---
>>  hw/pci/pcie.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> adding qemu-trivial in cc.  This is a candidate for 2.2.
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 

Thanks. :)

Best regards,
-Gonglei

>>
>> diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
>> index 58455bd..2902f7d 100644
>> --- a/hw/pci/pcie.c
>> +++ b/hw/pci/pcie.c
>> @@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,
>>          /* the slot is electromechanically locked.
>>           * This error is propagated up to qdev and then to HMP/QMP.
>>           */
>> -        error_setg_errno(errp, -EBUSY, "slot is electromechanically locked");
>> +        error_setg_errno(errp, EBUSY, "slot is electromechanically locked");
>>      }
>>  }
>>  
>>
>
diff mbox

Patch

diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 58455bd..2902f7d 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -229,7 +229,7 @@  static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,
         /* the slot is electromechanically locked.
          * This error is propagated up to qdev and then to HMP/QMP.
          */
-        error_setg_errno(errp, -EBUSY, "slot is electromechanically locked");
+        error_setg_errno(errp, EBUSY, "slot is electromechanically locked");
     }
 }