Minor style fixes from mav@ (with similar problems fixed where I noticed

them):
	#define<tab>
	zero memory when we allocate it
	Put device name in error message.

Submitted by:	mav@
This commit is contained in:
imp 2008-09-29 18:17:23 +00:00
parent 8a3e9c9a9d
commit c6c9e7b65c
2 changed files with 5 additions and 4 deletions

View File

@ -618,14 +618,15 @@ mmc_discover_cards(struct mmc_softc *sc)
device_t child;
while (1) {
ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF, M_WAITOK);
ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF,
M_WAITOK | M_ZERO);
if (!ivar)
return;
err = mmc_all_send_cid(sc, ivar->raw_cid);
if (err == MMC_ERR_TIMEOUT)
break;
if (err != MMC_ERR_NONE) {
printf("Error reading CID %d\n", err);
device_printf(sc->dev, "Error reading CID %d\n", err);
break;
}
if (mmcbr_get_mode(sc->dev) == mode_sd) {