summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@nvidia.com>2022-07-14 10:07:54 +0300
committerJakub Kicinski <kuba@kernel.org>2022-07-14 20:12:39 +0300
commit3d8c51b25a235e283e37750943bbf356ef187230 (patch)
tree2a825e07fd607d25694c2b76c151239e7ab2786a /include
parent51f1c31f8ba713f70f1659e7c91e837fe5f5554f (diff)
downloadlinux-3d8c51b25a235e283e37750943bbf356ef187230.tar.xz
net/tls: Check for errors in tls_device_init
Add missing error checks in tls_device_init. Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Reported-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/r/20220714070754.1428-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/tls.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 8017f1703447..8bd938f98bdd 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -704,7 +704,7 @@ int tls_sw_fallback_init(struct sock *sk,
struct tls_crypto_info *crypto_info);
#ifdef CONFIG_TLS_DEVICE
-void tls_device_init(void);
+int tls_device_init(void);
void tls_device_cleanup(void);
void tls_device_sk_destruct(struct sock *sk);
int tls_set_device_offload(struct sock *sk, struct tls_context *ctx);
@@ -724,7 +724,7 @@ static inline bool tls_is_sk_rx_device_offloaded(struct sock *sk)
return tls_get_ctx(sk)->rx_conf == TLS_HW;
}
#else
-static inline void tls_device_init(void) {}
+static inline int tls_device_init(void) { return 0; }
static inline void tls_device_cleanup(void) {}
static inline int