Skip to contentSkip to conversation

bnep:Fix variable assignment to function return value in the function bnep_rx_extenstion

PATCH RESEND New Nicholas Krause 1 participant 1 message Oct 2, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 bnep:Fix variable assignment to function return value in the function bnep_rx_extenstion

This fixes variable assignment for the variable err that returns to the caller of bnep_rx_extension has finish all its intended work or has failed by returning a error code to be properly assigned to the return value of the call to the function bnep_rx_control due to this function being able to fail and callers of bnep_rx_extension needing to be able to properly be signaled when this occurs.

---
 net/bluetooth/bnep/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/bnep/core.c +1 -1
index 1641367..09cecb3a 100644
@@ -270,7 +270,7 @@ static int bnep_rx_extension(struct bnep_session *s, struct sk_buff *skb)
 
 		switch (h->type & BNEP_TYPE_MASK) {
 		case BNEP_EXT_CONTROL:
-			bnep_rx_control(s, skb->data, skb->len);
+			err = bnep_rx_control(s, skb->data, skb->len);
 			break;
 
 		default:
Signature · 1 line
2.1.4