Commit fd0a0909 authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo

ath11k: return -ENOMEM on allocation failure

Returning PTR_ERR(NULL) means success, but we should return -ENOMEM.

Fixes: 1399fb87 ("ath11k: register MHI controller device for QCA6390")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200826113417.GE393664@mwanda
parent 342b6194
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment