net: sock: remove the unnecessary check in proto_register
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Thu, 22 Apr 2021 13:41:51 +0000 (21:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Apr 2021 20:10:03 +0000 (13:10 -0700)
commited744d819379ddeec5744b0bfc7eb6d0a8ac4e46
treeb90dd243db1b23d99371f9d9238d9dc9c62c52f7
parentcad4162a90aeff737a16c0286987f51e927f003a
net: sock: remove the unnecessary check in proto_register

tw_prot_cleanup will check the twsk_prot.

Fixes: 0f5907af3913 ("net: Fix potential memory leak in proto_register()")
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c