diff mbox

[02/12] firewire-lib: Fix sparse warning of incorrect type in assignment

Message ID 1401203687-4189-3-git-send-email-o-takashi@sakamocchi.jp (mailing list archive)
State Accepted
Commit 51212eea4f0e2ba9086d0949a524f81834d20ac4
Delegated to: Takashi Iwai
Headers show

Commit Message

Takashi Sakamoto May 27, 2014, 3:14 p.m. UTC
__be32 value should not be assigned directly to bool value.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/cmp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/firewire/cmp.c b/sound/firewire/cmp.c
index d31a403..ba8df5a 100644
--- a/sound/firewire/cmp.c
+++ b/sound/firewire/cmp.c
@@ -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);