diff options
author | Don Gagne <don@thegagnes.com> | 2014-06-29 12:01:43 -0700 |
---|---|---|
committer | Don Gagne <don@thegagnes.com> | 2014-06-29 12:01:43 -0700 |
commit | d5b5dcef24a7f5c7b2ed98081dd69a05f8d46959 (patch) | |
tree | 7e0e12ed525d6699c0128eb4137061a6ad0248f3 /src/systemcmds/mtd | |
parent | 94c69e11ae1ec44c80eec1c979201c7d7e51cdb0 (diff) | |
download | px4-firmware-d5b5dcef24a7f5c7b2ed98081dd69a05f8d46959.tar.gz px4-firmware-d5b5dcef24a7f5c7b2ed98081dd69a05f8d46959.tar.bz2 px4-firmware-d5b5dcef24a7f5c7b2ed98081dd69a05f8d46959.zip |
Fix bugs found through compiler warnings
Diffstat (limited to 'src/systemcmds/mtd')
-rw-r--r-- | src/systemcmds/mtd/mtd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/systemcmds/mtd/mtd.c b/src/systemcmds/mtd/mtd.c index a57eaafe7..8b43e54da 100644 --- a/src/systemcmds/mtd/mtd.c +++ b/src/systemcmds/mtd/mtd.c @@ -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; } |