diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-05-01 18:39:00 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-05-06 11:44:15 +0300 |
commit | 049ceac308b0d57c4f06b9fb957cdf95d315cf0b (patch) | |
tree | 0260f8ea02337eca39393f9874550f98c88fe5a2 /mm/mempool.c | |
parent | 08afb432c996e34e7047110a4d8c6979b8bd2b19 (diff) |
libertas_tf: avoid a null dereference in pointer priv
Currently there is a check if priv is null when calling lbtf_remove_card
but not in a previous call to if_usb_reset_dev that can also dereference
priv. Fix this by also only calling lbtf_remove_card if priv is null.
It is noteable that there don't seem to be any bugs reported that the
null pointer dereference has ever occurred, so I'm not sure if the null
check is required, but since we're doing a null check anyway it should
be done for both function calls.
Addresses-Coverity: ("Dereference before null check")
Fixes: baa0280f08c7 ("libertas_tf: don't defer firmware loading until start()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200501173900.296658-1-colin.king@canonical.com
Diffstat (limited to 'mm/mempool.c')
0 files changed, 0 insertions, 0 deletions