ALSA: firewire-lib: Fix sparse warning of incorrect type in assignment
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 27 May 2014 15:14:37 +0000 (00:14 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 27 May 2014 15:34:37 +0000 (17:34 +0200)
__be32 value should not be assigned directly to bool value.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/cmp.c

index d31a403ac53922dd94141d6ccfe17a9bcff9158d..ba8df5a1be396d7bb4766ff1a766f2ff0c7af943 100644 (file)
@@ -164,7 +164,9 @@ int cmp_connection_check_used(struct cmp_connection *c, bool *used)
                        c->resources.unit, TCODE_READ_QUADLET_REQUEST,
                        pcr_address(c), &pcr, 4, 0);
        if (err >= 0)
-               *used = (pcr & cpu_to_be32(PCR_BCAST_CONN | PCR_P2P_CONN_MASK));
+               *used = !!(pcr & cpu_to_be32(PCR_BCAST_CONN |
+                                            PCR_P2P_CONN_MASK));
+
        return err;
 }
 EXPORT_SYMBOL(cmp_connection_check_used);