i2c: xiic: Correct return value check for xiic_reinit()
authorDaniel Scally <dan.scally@ideasonboard.com>
Wed, 20 Sep 2023 13:41:09 +0000 (14:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:43 +0000 (14:56 +0200)
commit70a1df9e0b4405aef12b490a806b5e46ed582bb6
tree26462aeb6e6c8fc9e8c644ff7dadfa6c4bb9a134
parentfb9cfb28bdde57f49137d76e7a54dbd61206d337
i2c: xiic: Correct return value check for xiic_reinit()

[ Upstream commit 59851fb05d759f13662be143eff0aae605815b0e ]

The error paths for xiic_reinit() return negative values on failure
and 0 on success - this error message therefore is triggered on
_success_ rather than failure. Correct the condition so it's only
shown on failure as intended.

Fixes: 8fa9c9388053 ("i2c: xiic: return value of xiic_reinit")
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-xiic.c