Allow user of ARPC to pass a NULL pointer for the ARPC result.
For simple requests there may only be one error code for remote errors,
or the caller may simply not care to differentiate them.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
unsigned long flags;
int retval;
- *result = 0;
+ if (result)
+ *result = 0;
rpc = arpc_alloc(payload, size, type);
if (!rpc)
if (rpc->resp->result) {
retval = -EREMOTEIO;
- *result = rpc->resp->result;
+ if (result)
+ *result = rpc->resp->result;
} else {
retval = 0;
}