]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: get rid of a compile warning
authorAlex Elder <elder@linaro.org>
Thu, 14 Jul 2016 19:24:18 +0000 (14:24 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 15 Jul 2016 00:14:27 +0000 (09:14 +0900)
The compiler has no way of knowing whether a called function will
actually assign something to the object whose address is passed as
an argument.  So it must assume it won't happen, and this leads to a
compile warning.  Fix this.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/es2.c

index 7961622103bee7a9816148f32d2f0557212680cc..f64dbcb5e55432db2360967b72545073a1e58357 100644 (file)
@@ -611,7 +611,7 @@ static int cport_reset(struct gb_host_device *hd, u16 cport_id)
        struct usb_device *udev = es2->usb_dev;
        struct arpc_cport_reset req;
        int retval;
-       int result;
+       int result = 0;
 
        switch (cport_id) {
        case GB_SVC_CPORT_ID: