提交 6f9c2963 编写于 作者: J Jean Delvare 提交者: Greg Kroah-Hartman

[PATCH] scx200_acb: Fix return on init error

The scx200_acb driver shouldn't return failure after initialization
if it successfully registered at least one i2c_adapter, else we are
leaking resources. The driver was OK in that respect up to 2.6.16, a
recent change broke it.

This is part of the fix to bug #6445.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e515f048
......@@ -524,6 +524,9 @@ static int __init scx200_acb_init(void)
} else if (pci_dev_present(divil_pci))
rc = scx200_add_cs553x();
/* If at least one bus was created, init must succeed */
if (scx200_acb_list)
return 0;
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册