Skip to content

Commit

Permalink
i2c: Drop dummy variable
Browse files Browse the repository at this point in the history
Now that bus_for_each_drv() is no longer __must_check, we can drop the
dummy variable that was used to store the returned value.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Justin P. Mattock <justinmattock@gmail.com>
  • Loading branch information
Jean Delvare committed Aug 11, 2010
1 parent fe61e07 commit d670328
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ static int __process_new_adapter(struct device_driver *d, void *data)

static int i2c_register_adapter(struct i2c_adapter *adap)
{
int res = 0, dummy;
int res = 0;

/* Can't register until after driver model init */
if (unlikely(WARN_ON(!i2c_bus_type.p))) {
Expand Down Expand Up @@ -830,8 +830,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)

/* Notify drivers */
mutex_lock(&core_lock);
dummy = bus_for_each_drv(&i2c_bus_type, NULL, adap,
__process_new_adapter);
bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter);
mutex_unlock(&core_lock);

return 0;
Expand Down

0 comments on commit d670328

Please sign in to comment.