diff options
| author | Tariq Toukan <[email protected]> | 2022-07-14 07:07:54 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-07-14 17:12:39 +0000 |
| commit | 3d8c51b25a235e283e37750943bbf356ef187230 (patch) | |
| tree | 2a825e07fd607d25694c2b76c151239e7ab2786a /net/tls/tls_main.c | |
| parent | MAINTAINERS: Add an additional maintainer to the AMD XGBE driver (diff) | |
| download | kernel-3d8c51b25a235e283e37750943bbf356ef187230.tar.gz kernel-3d8c51b25a235e283e37750943bbf356ef187230.zip | |
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 <[email protected]>
Reviewed-by: Maxim Mikityanskiy <[email protected]>
Signed-off-by: Tariq Toukan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/tls/tls_main.c')
| -rw-r--r-- | net/tls/tls_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 2ffede463e4a..d80ab3d1764e 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -1048,7 +1048,12 @@ static int __init tls_register(void) if (err) return err; - tls_device_init(); + err = tls_device_init(); + if (err) { + unregister_pernet_subsys(&tls_proc_ops); + return err; + } + tcp_register_ulp(&tcp_tls_ulp_ops); return 0; |
