Skip to content

Commit f098c04

Browse files
cminyardopsiff
authored andcommitted
ipmi:ssif: NULL thread on error
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> (cherry picked from commit 97d35052a816875ad16bc37ae163ebc873b2928d) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent f5f2c66 commit f098c04

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,7 @@ static int ssif_probe(struct i2c_client *client)
18881888
"kssif%4.4x", thread_num);
18891889
if (IS_ERR(ssif_info->thread)) {
18901890
rv = PTR_ERR(ssif_info->thread);
1891+
ssif_info->thread = NULL;
18911892
dev_notice(&ssif_info->client->dev,
18921893
"Could not start kernel thread: error %d\n",
18931894
rv);

0 commit comments

Comments
 (0)