i2c: free idr when sanity checks in i2c_register_adapter() fail
authorWolfram Sang <wsa-dev@sang-engineering.com>
Sat, 9 Jul 2016 04:34:58 +0000 (13:34 +0900)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 14 Jul 2016 13:06:44 +0000 (22:06 +0900)
commitce0dffafd403e7824ae78a806d08c04ff8112e79
treebb210f5917c399613bf303e7db9da453d48f1acc
parentcc4618813e4bc409cd22641f6001118ef4479cfc
i2c: free idr when sanity checks in i2c_register_adapter() fail

On error, we should give idr back to the pool in any case.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core.c