* [PATCH net-next] ath11k: return -ENOMEM on allocation failure
@ 2020-08-26 11:34 Dan Carpenter
2020-08-27 10:19 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-08-26 11:34 UTC (permalink / raw)
To: Kalle Valo
Cc: Jakub Kicinski, kernel-janitors, Govind Singh, linux-wireless,
ath11k
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(-)
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,
--
2.28.0
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-27 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-26 11:34 [PATCH net-next] ath11k: return -ENOMEM on allocation failure Dan Carpenter
2020-08-27 10:19 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox