discover/device-handler: Initialise existing_device variable
authorJeremy Kerr <jk@ozlabs.org>
Tue, 19 Mar 2013 07:38:57 +0000 (15:38 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 29 Apr 2013 04:41:04 +0000 (14:41 +1000)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c

index 950e730b995b89af52073b0ba8eaf0906d4147a9..c661fbe2eb3c5aa9189cb720e5c12e064a296360 100644 (file)
@@ -38,7 +38,7 @@ static void context_commit(struct device_handler *handler,
 {
        struct discover_device *dev = ctx->device;
        struct discover_boot_option *opt, *tmp;
-       unsigned int i, existing_device;
+       unsigned int i, existing_device = 0;
 
        /* do we already have this device? */
        for (i = 0; i < handler->n_devices; i++) {