Bluetooth: Do not use assignments in IF conditions
Fix checkpatch warnings concerning assignments in if conditions. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
committed by
Gustavo F. Padovan
parent
17fa4b9dff
commit
5a08ecceda
@ -157,7 +157,8 @@ static int hidp_queue_event(struct hidp_session *session, struct input_dev *dev,
|
||||
|
||||
session->leds = newleds;
|
||||
|
||||
if (!(skb = alloc_skb(3, GFP_ATOMIC))) {
|
||||
skb = alloc_skb(3, GFP_ATOMIC);
|
||||
if (!skb) {
|
||||
BT_ERR("Can't allocate memory for new frame");
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -250,7 +251,8 @@ static int __hidp_send_ctrl_message(struct hidp_session *session,
|
||||
|
||||
BT_DBG("session %p data %p size %d", session, data, size);
|
||||
|
||||
if (!(skb = alloc_skb(size + 1, GFP_ATOMIC))) {
|
||||
skb = alloc_skb(size + 1, GFP_ATOMIC);
|
||||
if (!skb) {
|
||||
BT_ERR("Can't allocate memory for new frame");
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -283,7 +285,8 @@ static int hidp_queue_report(struct hidp_session *session,
|
||||
|
||||
BT_DBG("session %p hid %p data %p size %d", session, session->hid, data, size);
|
||||
|
||||
if (!(skb = alloc_skb(size + 1, GFP_ATOMIC))) {
|
||||
skb = alloc_skb(size + 1, GFP_ATOMIC);
|
||||
if (!skb) {
|
||||
BT_ERR("Can't allocate memory for new frame");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
Reference in New Issue
Block a user