]> git.itanic.dy.fi Git - linux-stable/commit
fsi: core: Fix return of error values on failures
authorColin Ian King <colin.king@canonical.com>
Thu, 3 Jun 2021 12:28:12 +0000 (13:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:41 +0000 (16:53 +0200)
commit19c8f5307a2ea7ac506e04977d4601b92bdef437
tree8761ff6fb1a9ae62910edced1c47db2b3032e348
parentaeed300a2e277934609b826aaa7e8374a8f35964
fsi: core: Fix return of error values on failures

[ Upstream commit 910810945707fe9877ca86a0dca4e585fd05e37b ]

Currently the cfam_read and cfam_write functions return the provided
number of bytes given in the count parameter and not the error return
code in variable rc, hence all failures of read/writes are being
silently ignored. Fix this by returning the error code in rc.

Addresses-Coverity: ("Unused value")
Fixes: d1dcd6782576 ("fsi: Add cfam char devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jeremy Kerr <jk@ozlabs.org>
Link: https://lore.kernel.org/r/20210603122812.83587-1-colin.king@canonical.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/fsi/fsi-core.c