diff mbox

[6/8] i2c:i2c_core Fix warning: variable 'dummy' set but not used

Message ID 1276547208-26569-7-git-send-email-justinmattock@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Douglas Landgraf
Headers show

Commit Message

Justin P. Mattock June 14, 2010, 8:26 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 1cca263..79c6c26 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -794,6 +794,8 @@  static int i2c_register_adapter(struct i2c_adapter *adap)
 	mutex_lock(&core_lock);
 	dummy = bus_for_each_drv(&i2c_bus_type, NULL, adap,
 				 __process_new_adapter);
+	if(!dummy)
+		dummy = 0;
 	mutex_unlock(&core_lock);
 
 	return 0;