Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / net / bluetooth / bnep / core.c
index 682bf20..d908d49 100644 (file)
@@ -75,7 +75,7 @@ static struct bnep_session *__bnep_get_session(u8 *dst)
 
        list_for_each(p, &bnep_session_list) {
                s = list_entry(p, struct bnep_session, list);   
-               if (!memcmp(dst, s->eh.h_source, ETH_ALEN))
+               if (!compare_ether_addr(dst, s->eh.h_source))
                        return s;
        }
        return NULL;
@@ -420,10 +420,10 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
        iv[il++] = (struct kvec) { &type, 1 };
        len++;
 
-       if (!memcmp(eh->h_dest, s->eh.h_source, ETH_ALEN))
+       if (!compare_ether_addr(eh->h_dest, s->eh.h_source))
                type |= 0x01;
 
-       if (!memcmp(eh->h_source, s->eh.h_dest, ETH_ALEN))
+       if (!compare_ether_addr(eh->h_source, s->eh.h_dest))
                type |= 0x02;
 
        if (type)
@@ -532,8 +532,8 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
        dev = alloc_netdev(sizeof(struct bnep_session),
                           (*req->device) ? req->device : "bnep%d",
                           bnep_net_setup);
-       if (!dev) 
-               return ENOMEM;
+       if (!dev)
+               return -ENOMEM;
 
 
        down_write(&bnep_session_sem);