summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/ipa_main.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2024-03-01 11:02:36 -0600
committerDavid S. Miller <davem@davemloft.net>2024-03-04 11:44:40 +0000
commite87e4371edfc369dcc6abbabc3f276d4e0260513 (patch)
tree037c7e34b60a51b08666ca8dff6c34e3a8c472ef /drivers/net/ipa/ipa_main.c
parentb78fcd0a36a7d11cc71e7ee56bb27e71aea8464a (diff)
downloadlinux-e87e4371edfc369dcc6abbabc3f276d4e0260513.tar.gz
linux-e87e4371edfc369dcc6abbabc3f276d4e0260513.tar.bz2
linux-e87e4371edfc369dcc6abbabc3f276d4e0260513.zip
net: ipa: change ipa_interrupt_config() prototype
Change the return type of ipa_interrupt_config() to be an error code rather than an IPA interrupt structure pointer, and assign the the pointer within that function. Change ipa_interrupt_deconfig() to take the IPA pointer as argument and have it invalidate the ipa->interrupt pointer. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_main.c')
-rw-r--r--drivers/net/ipa/ipa_main.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 00475fd7a205..0c6e6719d99e 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -542,12 +542,9 @@ static int ipa_config(struct ipa *ipa, const struct ipa_data *data)
if (ret)
goto err_hardware_deconfig;
- ipa->interrupt = ipa_interrupt_config(ipa);
- if (IS_ERR(ipa->interrupt)) {
- ret = PTR_ERR(ipa->interrupt);
- ipa->interrupt = NULL;
+ ret = ipa_interrupt_config(ipa);
+ if (ret)
goto err_mem_deconfig;
- }
ipa_uc_config(ipa);
@@ -572,8 +569,7 @@ err_endpoint_deconfig:
ipa_endpoint_deconfig(ipa);
err_uc_deconfig:
ipa_uc_deconfig(ipa);
- ipa_interrupt_deconfig(ipa->interrupt);
- ipa->interrupt = NULL;
+ ipa_interrupt_deconfig(ipa);
err_mem_deconfig:
ipa_mem_deconfig(ipa);
err_hardware_deconfig:
@@ -591,8 +587,7 @@ static void ipa_deconfig(struct ipa *ipa)
ipa_modem_deconfig(ipa);
ipa_endpoint_deconfig(ipa);
ipa_uc_deconfig(ipa);
- ipa_interrupt_deconfig(ipa->interrupt);
- ipa->interrupt = NULL;
+ ipa_interrupt_deconfig(ipa);
ipa_mem_deconfig(ipa);
ipa_hardware_deconfig(ipa);
}