diff mbox

[v5,03/11] megasas: Fix

Message ID 1462508442-9407-4-git-send-email-caoj.fnst@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Cao jin May 6, 2016, 4:20 a.m. UTC
msi_init returns non-zero value on both failure and success.

cc: Hannes Reinecke <hare@suse.de>
cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
 hw/scsi/megasas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cao jin May 6, 2016, 5:43 a.m. UTC | #1
sorry, forget to cc some maintainers

On 05/06/2016 12:20 PM, Cao jin wrote:
> msi_init returns non-zero value on both failure and success.
>
> cc: Hannes Reinecke <hare@suse.de>
> cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
>   hw/scsi/megasas.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
> index a63a581..56fb645 100644
> --- a/hw/scsi/megasas.c
> +++ b/hw/scsi/megasas.c
> @@ -2348,7 +2348,7 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
>                             "megasas-queue", 0x40000);
>
>       if (megasas_use_msi(s) &&
> -        msi_init(dev, 0x50, 1, true, false)) {
> +        msi_init(dev, 0x50, 1, true, false) < 0) {
>           s->flags &= ~MEGASAS_MASK_USE_MSI;
>       }
>       if (megasas_use_msix(s) &&
>
Marcel Apfelbaum May 15, 2016, 12:37 p.m. UTC | #2
On 05/06/2016 08:43 AM, Cao jin wrote:
> sorry, forget to cc some maintainers
>
> On 05/06/2016 12:20 PM, Cao jin wrote:
>> msi_init returns non-zero value on both failure and success.
>>
>> cc: Hannes Reinecke <hare@suse.de>
>> cc: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>>   hw/scsi/megasas.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
>> index a63a581..56fb645 100644
>> --- a/hw/scsi/megasas.c
>> +++ b/hw/scsi/megasas.c
>> @@ -2348,7 +2348,7 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
>>                             "megasas-queue", 0x40000);
>>
>>       if (megasas_use_msi(s) &&
>> -        msi_init(dev, 0x50, 1, true, false)) {
>> +        msi_init(dev, 0x50, 1, true, false) < 0) {
>>           s->flags &= ~MEGASAS_MASK_USE_MSI;
>>       }
>>       if (megasas_use_msix(s) &&
>>
>


Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Thanks,
Marcel
diff mbox

Patch

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index a63a581..56fb645 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2348,7 +2348,7 @@  static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
                           "megasas-queue", 0x40000);
 
     if (megasas_use_msi(s) &&
-        msi_init(dev, 0x50, 1, true, false)) {
+        msi_init(dev, 0x50, 1, true, false) < 0) {
         s->flags &= ~MEGASAS_MASK_USE_MSI;
     }
     if (megasas_use_msix(s) &&