X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fmfd%2Fhtc-i2cpld.c;h=417b0355d904d43be8c2a32047f8f21659a3157d;hb=09c0796adf0c793462fda1d7c8c43324551405c7;hp=247f9849e54ae88864ea094c403f885584bb6b68;hpb=f75020fcb97a54c0d2ade1f4918db82f44d225ad;p=linux-2.6-microblaze.git diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index 247f9849e54a..417b0355d904 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c @@ -346,6 +346,7 @@ static int htcpld_register_chip_i2c( if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_READ_BYTE_DATA)) { dev_warn(dev, "i2c adapter %d non-functional\n", pdata->i2c_adapter_id); + i2c_put_adapter(adapter); return -EINVAL; } @@ -360,6 +361,7 @@ static int htcpld_register_chip_i2c( /* I2C device registration failed, contineu with the next */ dev_warn(dev, "Unable to add I2C device for 0x%x\n", plat_chip_data->addr); + i2c_put_adapter(adapter); return PTR_ERR(client); }