X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tools%2Fsrc%2Feeprom_fix.c;h=088510edcc87e60b6ac0dc318590a7ff48232def;hb=42f3ffb244e5cabba181fe6c59042caa61b650cb;hp=7f28179a4acbab43d975ffdc9d2357af1c811113;hpb=e72388a0aa23da8bc8e24a0cbe9d523c5a9ce294;p=carl9170fw.git diff --git a/tools/src/eeprom_fix.c b/tools/src/eeprom_fix.c index 7f28179..088510e 100644 --- a/tools/src/eeprom_fix.c +++ b/tools/src/eeprom_fix.c @@ -1,5 +1,5 @@ /* - * Copyright 2010, Christian Lamparter + * Copyright 2010-2011 Christian Lamparter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ static int get_addr(char *str, unsigned int *val) return -EINVAL; } - return 0; + return err; } static int @@ -275,8 +275,9 @@ int main(int argc, char *args[]) fw = carlfw_load(args[1]); if (IS_ERR_OR_NULL(fw)) { + err = PTR_ERR(fw); fprintf(stderr, "Failed to open file \"%s\" (%d).\n", - args[1], (int) PTR_ERR(fw)); + args[1], err); goto out; }