]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: altera: use proper variable to hold errno
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 27 Mar 2020 22:28:26 +0000 (23:28 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 15 Apr 2020 09:48:21 +0000 (11:48 +0200)
commitc4afc6a0454a34c0cfc01c0ae0c9654506752cca
treea8d30e03019249455d3c09df974791403b12f4a3
parent2675a70d7e3ae2a685f1b69484fa5aecfd95654e
i2c: altera: use proper variable to hold errno

device_property_read_u32() returns errno or 0, so we should use the
integer variable 'ret' and not the u32 'val' to hold the retval.

Fixes: bdd8edf01252 ("i2c: altera: Add Altera I2C Controller driver")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-altera.c