]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ipmi:ssif: NULL thread on error
authorCorey Minyard <corey@minyard.net>
Tue, 21 Apr 2026 11:50:22 +0000 (06:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Jun 2026 11:42:38 +0000 (13:42 +0200)
commit a8aebe93a4938c0ca1941eeaae821738f869be3d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ipmi/ipmi_ssif.c

index b237ce42a51f661cc8791d819f4030ba340e9646..7950f13c1ef768a1a92a46453519bbe84085ca69 100644 (file)
@@ -1907,6 +1907,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);