Commit d4691275 authored by Dan Carpenter's avatar Dan Carpenter Committed by Wolfram Sang
Browse files

i2c: nomadik: remove an unnecessary NULL check in nmk_i2c_remove()



"res" can't be NULL because it's a pointer to somewhere in the middle of
the "adev" struct.  Also probe() succeeded so there is no need to check
here.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 9a103872
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1070,7 +1070,6 @@ static int nmk_i2c_remove(struct amba_device *adev)
	/* disable the controller */
	i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE);
	clk_disable_unprepare(dev->clk);
	if (res)
	release_mem_region(res->start, resource_size(res));

	return 0;