Bluetooth: bnep: Return err value while sending cmd is not understood
authorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Fri, 3 Apr 2015 10:14:52 +0000 (12:14 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 3 Apr 2015 17:52:35 +0000 (19:52 +0200)
Send command not understood response should be verified if it was
successfully sent, like all send responses.

Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/bnep/core.c

index c05eccc1cf82564549feb142ee3b14683d9f83a9..5cf5fbd2908d111c0bdf683726a259df27427346 100644 (file)
@@ -239,7 +239,7 @@ static int bnep_rx_control(struct bnep_session *s, void *data, int len)
                        pkt[0] = BNEP_CONTROL;
                        pkt[1] = BNEP_CMD_NOT_UNDERSTOOD;
                        pkt[2] = cmd;
-                       bnep_send(s, pkt, sizeof(pkt));
+                       err = bnep_send(s, pkt, sizeof(pkt));
                }
                break;
        }