diff options
author | Michael Buesch <m@bues.ch> | 2021-05-15 21:02:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-14 16:53:07 +0200 |
commit | f4b4b121521d71ab7df8ebdb8b28457b33eceb22 (patch) | |
tree | 7bee1e74fe9aecb392c6efb32afe35b78ccd3d77 /drivers/ssb | |
parent | 96bb095f8536f7d161b8e5a53b17edb7c4b87221 (diff) | |
download | linux-stable-f4b4b121521d71ab7df8ebdb8b28457b33eceb22.tar.gz linux-stable-f4b4b121521d71ab7df8ebdb8b28457b33eceb22.tar.bz2 linux-stable-f4b4b121521d71ab7df8ebdb8b28457b33eceb22.zip |
ssb: sdio: Don't overwrite const buffer if block_write fails
commit 47ec636f7a25aa2549e198c48ecb6b1c25d05456 upstream.
It doesn't make sense to clobber the const driver-side buffer, if a
write-to-device attempt failed. All other SSB variants (PCI, PCMCIA and SoC)
also don't corrupt the buffer on any failure in block_write.
Therefore, remove this memset from the SDIO variant.
Signed-off-by: Michael Büsch <m@bues.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210515210252.318be2ba@wiggum
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/ssb')
-rw-r--r-- | drivers/ssb/sdio.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ssb/sdio.c b/drivers/ssb/sdio.c index 7fe0afb42234..66c5c2169704 100644 --- a/drivers/ssb/sdio.c +++ b/drivers/ssb/sdio.c @@ -411,7 +411,6 @@ static void ssb_sdio_block_write(struct ssb_device *dev, const void *buffer, sdio_claim_host(bus->host_sdio); if (unlikely(ssb_sdio_switch_core(bus, dev))) { error = -EIO; - memset((void *)buffer, 0xff, count); goto err_out; } offset |= bus->sdio_sbaddr & 0xffff; |