commit | 51c266561e5aec056e025b5bf9072d82c89b59b3 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Sun Jan 21 10:26:31 2018 +0530 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Mon Jan 22 16:45:26 2018 +0100 |
tree | 9e3bb63ff4e24eda044a5f3deae9ad37d0cc7955 | |
parent | d6088e9a89f7c6fe9720978196c4d9799fd16c29 [diff] |
soundwire: Fix a signedness bug "ret" is an int and "buf" is a u8. sdw_read() returns negative error codes which are truncated to the u8, 0-255 range before being stored as an int. It means that "ret" can't be less than zero. Fixes: b0a9c37b0178 ("soundwire: Add slave status handling") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>