Fix bugs found through compiler warnings

This commit is contained in:
Don Gagne
2014-06-29 12:01:43 -07:00
parent 94c69e11ae
commit d5b5dcef24
10 changed files with 33 additions and 14 deletions
+6 -2
View File
@@ -193,8 +193,12 @@ ramtron_attach(void)
errx(1, "failed to initialize mtd driver");
int ret = mtd_dev->ioctl(mtd_dev, MTDIOC_SETSPEED, (unsigned long)10*1000*1000);
if (ret != OK)
warnx(1, "failed to set bus speed");
if (ret != OK) {
// FIXME: From the previous warnx call, it looked like this should have been an errx instead. Tried
// that but setting the bug speed does fail all the time. Which was then exiting and the board would
// not run correctly. So changed to warnx.
warnx("failed to set bus speed");
}
attached = true;
}
+1
View File
@@ -372,6 +372,7 @@ int test_mixer(int argc, char *argv[])
}
warnx("SUCCESS: No errors in mixer test");
return 0;
}
static int