]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: fix leaked device refcount on of_find_i2c_* error path
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Mon, 27 Jul 2015 14:30:48 +0000 (17:30 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 1 Aug 2015 10:11:58 +0000 (12:11 +0200)
commit1d1d48913a4e73815264a7693ced2b2d3e574545
tree435b300b8fb5257f2d3cbd7003860241bd8a5f80
parent0a84a0cecf91f345176b61637ec42714be288033
i2c: fix leaked device refcount on of_find_i2c_* error path

If of_find_i2c_device_by_node() or of_find_i2c_adapter_by_node() find
a device by node, but its type does not match, a reference to that
device is still held. This change fixes the problem.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core.c