From: Alex Elder Date: Thu, 14 Jul 2016 19:24:18 +0000 (-0500) Subject: greybus: get rid of a compile warning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=99ade1766dbd11652905ec91219a643992cb3c18;p=linux-beck.git greybus: get rid of a compile warning 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 Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index 7961622103be..f64dbcb5e554 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -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: