Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6703281 authored by Jean Delvare's avatar Jean Delvare
Browse files

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: default avatarJean Delvare <khali@linux-fr.org>
Cc: Justin P. Mattock <justinmattock@gmail.com>
parent fe61e07e
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -789,7 +789,7 @@ static int __process_new_adapter(struct device_driver *d, void *data)


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


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


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


	return 0;
	return 0;