diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 9d6b790d43210fa3e21ff7b3b3c9fc6b6011c941..bb5466b27b59ab6796a28788ed2b3575274f9538 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -926,7 +926,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
 	 * The reason to do so is to avoid sysfs names that only make
 	 * sense when there are multiple adapters.
 	 */
-	i2c->adap.nr = dev->id >= 0 ? dev->id : 0;
+	i2c->adap.nr = dev->id != -1 ? dev->id : 0;
 
 	ret = i2c_add_numbered_adapter(&i2c->adap);
 	if (ret < 0) {