Make sure to always set the result value for ARPC instead of forcing
every caller to do it in order to avoid compiler warnings.
The ARPC result should still be ignored unless arpc_sync returns
-EREMOTEIO.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
struct usb_device *udev = es2->usb_dev;
struct arpc_cport_reset_req req;
int retval;
struct usb_device *udev = es2->usb_dev;
struct arpc_cport_reset_req req;
int retval;
switch (cport_id) {
case GB_SVC_CPORT_ID:
switch (cport_id) {
case GB_SVC_CPORT_ID:
unsigned long flags;
int retval;
unsigned long flags;
int retval;
rpc = arpc_alloc(payload, size, type);
if (!rpc)
return -ENOMEM;
rpc = arpc_alloc(payload, size, type);
if (!rpc)
return -ENOMEM;
- *result = rpc->resp->result;
- if (*result)
+ if (rpc->resp->result) {
+ *result = rpc->resp->result;
+ } else {
out_arpc_del:
spin_lock_irqsave(&es2->arpc_lock, flags);
out_arpc_del:
spin_lock_irqsave(&es2->arpc_lock, flags);