aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/usb.c
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2012-09-27 08:49:49 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-10-24 04:49:56 -0400
commit5dbdf6feecad54b739cb7a5cff521fba86cabba5 (patch)
treeeb013cbac3f03b8ea22edcae6b56ad93841c747b /drivers/net/wireless/ath/ath6kl/usb.c
parentcf0dfa1330495ae2c3757788224cc043cfb17e77 (diff)
ath6kl: Return error case when ath6kl_usb_alloc_pipe_resources fails
Incase the resource allocation for the struct ath6kl_urb_context in the function ath6kl_usb_alloc_pipe_resources fails, return this error case so that ath6kl_usb_probe is aware of this error case. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/usb.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/usb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index a6d13775467f..2014fac42749 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -185,9 +185,10 @@ static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,
185 for (i = 0; i < urb_cnt; i++) { 185 for (i = 0; i < urb_cnt; i++) {
186 urb_context = kzalloc(sizeof(struct ath6kl_urb_context), 186 urb_context = kzalloc(sizeof(struct ath6kl_urb_context),
187 GFP_KERNEL); 187 GFP_KERNEL);
188 if (urb_context == NULL) 188 if (urb_context == NULL) {
189 /* FIXME: set status to -ENOMEM */ 189 status = -ENOMEM;
190 break; 190 goto fail_alloc_pipe_resources;
191 }
191 192
192 urb_context->pipe = pipe; 193 urb_context->pipe = pipe;
193 194
@@ -204,6 +205,7 @@ static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,
204 pipe->logical_pipe_num, pipe->usb_pipe_handle, 205 pipe->logical_pipe_num, pipe->usb_pipe_handle,
205 pipe->urb_alloc); 206 pipe->urb_alloc);
206 207
208fail_alloc_pipe_resources:
207 return status; 209 return status;
208} 210}
209 211