Skip to content

Commit d670328

Browse files
author
Jean Delvare
committed
i2c: Drop dummy variable
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>
1 parent fe61e07 commit d670328

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/i2c/i2c-core.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ static int __process_new_adapter(struct device_driver *d, void *data)
789789

790790
static int i2c_register_adapter(struct i2c_adapter *adap)
791791
{
792-
int res = 0, dummy;
792+
int res = 0;
793793

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

831831
/* Notify drivers */
832832
mutex_lock(&core_lock);
833-
dummy = bus_for_each_drv(&i2c_bus_type, NULL, adap,
834-
__process_new_adapter);
833+
bus_for_each_drv(&i2c_bus_type, NULL, adap, __process_new_adapter);
835834
mutex_unlock(&core_lock);
836835

837836
return 0;

0 commit comments

Comments
 (0)