diff options
| author | Dan Carpenter <[email protected]> | 2025-04-02 11:01:41 +0000 |
|---|---|---|
| committer | Luiz Augusto von Dentz <[email protected]> | 2025-04-10 17:09:16 +0000 |
| commit | 324dddea321078a6eeb535c2bff5257be74c9799 (patch) | |
| tree | bea03ec25713c16a3929c292b508c7afaeaa541f /drivers/fpga/tests/fpga-bridge-test.c | |
| parent | Bluetooth: hci_event: Fix sending MGMT_EV_DEVICE_FOUND for invalid address (diff) | |
| download | kernel-324dddea321078a6eeb535c2bff5257be74c9799.tar.gz kernel-324dddea321078a6eeb535c2bff5257be74c9799.zip | |
Bluetooth: btrtl: Prevent potential NULL dereference
The btrtl_initialize() function checks that rtl_load_file() either
had an error or it loaded a zero length file. However, if it loaded
a zero length file then the error code is not set correctly. It
results in an error pointer vs NULL bug, followed by a NULL pointer
dereference. This was detected by Smatch:
drivers/bluetooth/btrtl.c:592 btrtl_initialize() warn: passing zero to 'ERR_PTR'
Fixes: 26503ad25de8 ("Bluetooth: btrtl: split the device initialization into smaller parts")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
Diffstat (limited to 'drivers/fpga/tests/fpga-bridge-test.c')
0 files changed, 0 insertions, 0 deletions
