Skip to content

Commit

Permalink
[PATCH] scx200_acb: Fix return on init error
Browse files Browse the repository at this point in the history
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: Jean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed May 9, 2006
1 parent e515f04 commit 6f9c296
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6f9c296

Please sign in to comment.