ssb: sdio: Don't overwrite const buffer if block_write fails
authorMichael Buesch <m@bues.ch>
Sat, 15 May 2021 19:02:52 +0000 (21:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:55:45 +0000 (16:55 +0200)
commit43189683fe5d7b2ba60a54b454d2fa67f2f74e97
treee67483c5f88db80890494f481fcd3afd9767d644
parent58940e88ba633eceaee235c9aaca25533c866fa9
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>
drivers/ssb/sdio.c