mt76: usb: remove skb check in mt76x{0,2}u mcu routines

Remove mt76_mcu_msg_alloc return value check since it is already
evaluated in __mt76x02u_mcu_send_msg

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Lorenzo Bianconi 2018-09-09 23:57:54 +02:00 committed by Felix Fietkau
parent 331419b2ce
commit 8799b624fe
2 changed files with 0 additions and 24 deletions

View File

@ -54,8 +54,6 @@ int mt76x0_mcu_function_select(struct mt76x0_dev *dev,
};
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_FUN_SET_OP, func == 5);
}
@ -72,8 +70,6 @@ mt76x0_mcu_calibrate(struct mt76x0_dev *dev, enum mcu_calibrate cal, u32 val)
};
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_CALIBRATION_OP, true);
}

View File

@ -43,8 +43,6 @@ mt76x2u_mcu_function_select(struct mt76x2_dev *dev, enum mcu_function func,
struct sk_buff *skb;
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_FUN_SET_OP,
func != Q_SELECT);
}
@ -61,8 +59,6 @@ int mt76x2u_mcu_set_radio_state(struct mt76x2_dev *dev, bool val)
struct sk_buff *skb;
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_POWER_SAVING_OP,
false);
}
@ -91,8 +87,6 @@ int mt76x2u_mcu_load_cr(struct mt76x2_dev *dev, u8 type, u8 temp_level,
/* first set the channel without the extension channel info */
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_LOAD_CR, true);
}
@ -119,18 +113,12 @@ int mt76x2u_mcu_set_channel(struct mt76x2_dev *dev, u8 channel, u8 bw,
/* first set the channel without the extension channel info */
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
mt76_mcu_send_msg(dev, skb, CMD_SWITCH_CHANNEL_OP, true);
usleep_range(5000, 10000);
msg.ext_chan = 0xe0 + bw_index;
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_SWITCH_CHANNEL_OP, true);
}
@ -147,8 +135,6 @@ int mt76x2u_mcu_calibrate(struct mt76x2_dev *dev, enum mcu_calibration type,
struct sk_buff *skb;
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_CALIBRATION_OP, true);
}
@ -168,8 +154,6 @@ int mt76x2u_mcu_init_gain(struct mt76x2_dev *dev, u8 channel, u32 gain,
msg.channel |= cpu_to_le32(BIT(31));
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_INIT_GAIN_OP, true);
}
@ -194,8 +178,6 @@ int mt76x2u_mcu_set_dynamic_vga(struct mt76x2_dev *dev, u8 channel, bool ap,
msg.channel = cpu_to_le32(val);
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_DYNC_VGA_OP, true);
}
@ -212,8 +194,6 @@ int mt76x2u_mcu_tssi_comp(struct mt76x2_dev *dev,
struct sk_buff *skb;
skb = mt76_mcu_msg_alloc(dev, &msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt76_mcu_send_msg(dev, skb, CMD_CALIBRATION_OP, true);
}