Message ID | 20200826113417.GE393664@mwanda (mailing list archive) |
---|---|
State | Accepted |
Commit | fd0a0909723346911c2fb9832b63581457f00e8e |
Delegated to: | Kalle Valo |
Headers | show |
Series | [net-next] ath11k: return -ENOMEM on allocation failure | expand |
Dan Carpenter <dan.carpenter@oracle.com> wrote: > Returning PTR_ERR(NULL) means success, but we should return -ENOMEM. > > Fixes: 1399fb87ea3e ("ath11k: register MHI controller device for QCA6390") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Patch applied to ath-next branch of ath.git, thanks. fd0a09097233 ath11k: return -ENOMEM on allocation failure
diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c index d7e60dc5b300..aded9a719d51 100644 --- a/drivers/net/wireless/ath/ath11k/mhi.c +++ b/drivers/net/wireless/ath/ath11k/mhi.c @@ -220,7 +220,7 @@ int ath11k_mhi_register(struct ath11k_pci *ab_pci) mhi_ctrl = kzalloc(sizeof(*mhi_ctrl), GFP_KERNEL); if (!mhi_ctrl) - return PTR_ERR(mhi_ctrl); + return -ENOMEM; ath11k_core_create_firmware_path(ab, ATH11K_AMSS_FILE, ab_pci->amss_path,
Returning PTR_ERR(NULL) means success, but we should return -ENOMEM. Fixes: 1399fb87ea3e ("ath11k: register MHI controller device for QCA6390") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/net/wireless/ath/ath11k/mhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)