Commit Graph
14 Commits
Author SHA1 Message Date
Colin Ian KingandFelix Fietkau 9e1b8edcf3 mt76: fix memcpy to potential null pointer on failed allocation
Currently if the allocation of skb fails and returns NULL then the
call to skb_put will cause a null pointer dereference. Fix this by
checking for a null skb and returning NULL.  Note that calls to
function mt76x2_mcu_msg_alloc don't directly check the null return
but instead pass the NULL pointer to mt76x2_mcu_msg_send which
checks for the NULL and returns ENOMEM in this case.

Detected by CoverityScan, CID#1462624 ("Dereference null return value")

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Colin Ian King <[email protected]>
2018-01-30 10:23:03 +01:00
Lorenzo BianconiandFelix Fietkau 28957755ae mt76x2: mcu: remove unused parameter in mt76x2_mcu_msg_alloc signature
Signed-off-by: Lorenzo Bianconi <[email protected]>
2017-11-16 20:34:45 +01:00
Felix Fietkau becce8bd46 mt76x2: fix more checkpatch errors
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-05 10:08:16 +02:00
Felix Fietkau d7f5112c09 mt76x2: fix checkpatch warnings
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 18:59:22 +02:00
Felix Fietkau b300bdc42e use the new bitfield accessor macros
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 17:37:26 +02:00
Felix Fietkau 53c1b7f6ac update my email address
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 17:33:28 +02:00
Felix Fietkau ced81a3458 relicense to ISC (except for util.h which is based on GPL'd kernel code
Signed-off-by: Felix Fietkau <[email protected]>
2016-07-12 08:38:46 +02:00
Felix Fietkau 654686b96d mt76x2: purge MCU response queue on exit
Signed-off-by: Felix Fietkau <[email protected]>
2016-03-03 20:13:57 +01:00
Felix Fietkau 079ad90fe2 update copyright lines
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-25 18:09:13 +01:00
Felix Fietkau 38702fa03a move the struct device pointer to struct mt76_device
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 20:36:08 +01:00
Felix Fietkau b0f76bb5d9 move register poll functions to core
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 19:20:00 +01:00
Felix Fietkau 62ecfb9730 move more register accessor functions to mt76.h
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 18:01:45 +01:00
Felix Fietkau e20a9c13a5 move mmio functions/init to mt76.ko
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 17:52:00 +01:00
Felix Fietkau a0ee20716f add a mt76x2_ prefix to all files
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 16:54:53 +01:00