]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
r8152: add error handling in rtl8152_driver_init
authorYi Cong <yicong@kylinos.cn>
Sat, 11 Oct 2025 08:24:15 +0000 (16:24 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 14 Oct 2025 10:07:21 +0000 (12:07 +0200)
commit75527d61d60d493d1eb064f335071a20ca581f54
tree71dff4f6da9a0666466433d2bd6bcc98d1fee1ea
parent327cd4b68b4398b6c24f10eb2b2533ffbfc10185
r8152: add error handling in rtl8152_driver_init

rtl8152_driver_init() is missing the error handling.
When rtl8152_driver registration fails, rtl8152_cfgselector_driver
should be deregistered.

Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection")
Cc: stable@vger.kernel.org
Signed-off-by: Yi Cong <yicong@kylinos.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251011082415.580740-1-yicongsrfy@163.com
[pabeni@redhat.com: clarified the commit message]
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/usb/r8152.c