summaryrefslogtreecommitdiff
path: root/drivers/usb/early
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-03-04 10:04:48 +0300
committerSasha Levin <sashal@kernel.org>2024-03-27 01:20:58 +0300
commit1d4ff6a8f85e78c1a8dec849e781f58162dbabbe (patch)
tree080df50e9d05eb2389721f70222def19ee3532af /drivers/usb/early
parentd2b48ecc760ae540b298bcf88a050c8bceef9662 (diff)
downloadlinux-1d4ff6a8f85e78c1a8dec849e781f58162dbabbe.tar.xz
staging: greybus: fix get_channel_from_mode() failure path
[ Upstream commit 34164202a5827f60a203ca9acaf2d9f7d432aac8 ] The get_channel_from_mode() function is supposed to return the channel which matches the mode. But it has a bug where if it doesn't find a matching channel then it returns the last channel. It should return NULL instead. Also remove an unnecessary NULL check on "channel". Fixes: 2870b52bae4c ("greybus: lights: add lights implementation") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/379c0cb4-39e0-4293-8a18-c7b1298e5420@moroto.mountain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/usb/early')
0 files changed, 0 insertions, 0 deletions