Skip to content

Commit 47ec636

Browse files
mbueschKalle Valo
authored andcommitted
ssb: sdio: Don't overwrite const buffer if block_write fails
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 <[email protected]> Cc: [email protected] Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/20210515210252.318be2ba@wiggum
1 parent 77a0989 commit 47ec636

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/ssb/sdio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ static void ssb_sdio_block_write(struct ssb_device *dev, const void *buffer,
411411
sdio_claim_host(bus->host_sdio);
412412
if (unlikely(ssb_sdio_switch_core(bus, dev))) {
413413
error = -EIO;
414-
memset((void *)buffer, 0xff, count);
415414
goto err_out;
416415
}
417416
offset |= bus->sdio_sbaddr & 0xffff;

0 commit comments

Comments
 (0)