]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ipmi:ssif: NULL thread on error
authorCorey Minyard <corey@minyard.net>
Tue, 21 Apr 2026 11:50:22 +0000 (06:50 -0500)
committerCorey Minyard <corey@minyard.net>
Tue, 28 Apr 2026 17:59:15 +0000 (12:59 -0500)
Cleanup code was checking the thread for NULL, but it was possibly
a PTR_ERR() in one spot.

Spotted with static analysis.

Link: https://sourceforge.net/p/openipmi/mailman/message/59324676/
Fixes: 75c486cb1bca ("ipmi:ssif: Clean up kthread on errors")
Cc: <stable@vger.kernel.org> # 91eb7ec72612: ipmi:ssif: Remove unnecessary indention
Cc: stable@vger.kernel.org
Signed-off-by: Corey Minyard <corey@minyard.net>
drivers/char/ipmi/ipmi_ssif.c

index f3798f4e6a6374091a165e0e698d925090e1d9d9..f419b46bf00207c59e81a9db9ded012f03106bf5 100644 (file)
@@ -1905,6 +1905,7 @@ static int ssif_probe(struct i2c_client *client)
                                        "kssif%4.4x", thread_num);
        if (IS_ERR(ssif_info->thread)) {
                rv = PTR_ERR(ssif_info->thread);
+               ssif_info->thread = NULL;
                dev_notice(&ssif_info->client->dev,
                           "Could not start kernel thread: error %d\n",
                           rv);