carlu: fix copy+paste error
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 15 Oct 2010 20:12:45 +0000 (22:12 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 15 Oct 2010 20:12:45 +0000 (22:12 +0200)
Don't download and check the firmware image twice.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
tools/carlu/src/usb.c

index a6d7cb8ab8514a988b5a044daf192fe9c2b59eae..c99dbc13994ae9aa4dcb87606194c6ce416ee3aa 100644 (file)
@@ -562,14 +562,6 @@ static int carlusb_upload_firmware(struct carlusb *ar, bool boot)
        if (IS_ERR_OR_NULL(buf))
                return PTR_ERR(buf);
 
-       ret = carlu_fw_check(&ar->common);
-       if (ret)
-               return ret;
-
-       ret = carlusb_fw_check(ar);
-       if (ret)
-               return ret;
-
        if (ar->miniboot_size) {
                dbg("Miniboot firmware size:%d\n", ar->miniboot_size);
                len -= ar->miniboot_size;
@@ -689,10 +681,6 @@ struct carlu *carlusb_probe(void)
        ar->stop_event_polling = false;
        ar->event_thread = SDL_CreateThread(carlusb_event_thread, ar);
 
-       ret = carlusb_load_firmware(ar);
-       if (ret)
-               goto err_out;
-
        ret = carlusb_upload_firmware(ar, true);
        if (ret)
                goto err_kill;