* [PATCH] drivers/ssb/sdio: Don't overwrite const buffer if block_write fails
@ 2021-05-15 19:02 Michael Büsch
2021-06-15 10:11 ` ssb: sdio: " Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Michael Büsch @ 2021-05-15 19:02 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Albert Herranz
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
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
---
This memset has been introduced by the original patch that added SDIO support to SSB:
24ea602e183ca
Better late than never.
This change is only build tested, because I don't own the hardware.
But to me this change looks reasonable.
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;
--
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-15 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 19:02 [PATCH] drivers/ssb/sdio: Don't overwrite const buffer if block_write fails Michael Büsch
2021-06-15 10:11 ` ssb: sdio: " Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.