Lines Matching refs:rv
90 int rv; in ipmi_open() local
97 rv = ipmi_create_user(if_num, in ipmi_open()
101 if (rv) { in ipmi_open()
119 return rv; in ipmi_open()
125 int rv; in ipmi_release() local
128 rv = ipmi_destroy_user(priv->user); in ipmi_release()
129 if (rv) in ipmi_release()
130 return rv; in ipmi_release()
145 int rv; in handle_send_req() local
165 rv = ipmi_validate_addr(&addr, req->addr_len); in handle_send_req()
166 if (rv) in handle_send_req()
171 rv = -EMSGSIZE; in handle_send_req()
178 rv = -EFAULT; in handle_send_req()
185 rv = ipmi_request_settime(user, in handle_send_req()
195 return rv; in handle_send_req()
207 int rv = 0, rv2 = 0; in handle_recv() local
223 rv = -EAGAIN; in handle_recv()
233 rv = -EINVAL; in handle_recv()
238 rv = -EFAULT; in handle_recv()
260 rv = -EFAULT; in handle_recv()
268 rv = copyout(rsp, to); in handle_recv()
269 if (rv) in handle_recv()
284 return rv; in handle_recv()
296 int rv = -EINVAL; in ipmi_ioctl() local
309 rv = -EFAULT; in ipmi_ioctl()
318 rv = handle_send_req(priv->user, &req, retries, retry_time_ms); in ipmi_ioctl()
327 rv = -EFAULT; in ipmi_ioctl()
331 rv = handle_send_req(priv->user, in ipmi_ioctl()
344 rv = -EFAULT; in ipmi_ioctl()
346 rv = handle_recv(priv, cmd == IPMICTL_RECEIVE_MSG_TRUNC, in ipmi_ioctl()
356 rv = -EFAULT; in ipmi_ioctl()
360 rv = ipmi_register_for_cmd(priv->user, val.netfn, val.cmd, in ipmi_ioctl()
370 rv = -EFAULT; in ipmi_ioctl()
374 rv = ipmi_unregister_for_cmd(priv->user, val.netfn, val.cmd, in ipmi_ioctl()
384 rv = -EFAULT; in ipmi_ioctl()
388 rv = ipmi_register_for_cmd(priv->user, val.netfn, val.cmd, in ipmi_ioctl()
398 rv = -EFAULT; in ipmi_ioctl()
402 rv = ipmi_unregister_for_cmd(priv->user, val.netfn, val.cmd, in ipmi_ioctl()
412 rv = -EFAULT; in ipmi_ioctl()
416 rv = ipmi_set_gets_events(priv->user, val); in ipmi_ioctl()
426 rv = -EFAULT; in ipmi_ioctl()
430 rv = ipmi_set_my_address(priv->user, 0, val); in ipmi_ioctl()
439 rv = ipmi_get_my_address(priv->user, 0, &rval); in ipmi_ioctl()
440 if (rv) in ipmi_ioctl()
446 rv = -EFAULT; in ipmi_ioctl()
457 rv = -EFAULT; in ipmi_ioctl()
461 rv = ipmi_set_my_LUN(priv->user, 0, val); in ipmi_ioctl()
470 rv = ipmi_get_my_LUN(priv->user, 0, &rval); in ipmi_ioctl()
471 if (rv) in ipmi_ioctl()
477 rv = -EFAULT; in ipmi_ioctl()
488 rv = -EFAULT; in ipmi_ioctl()
500 rv = -EFAULT; in ipmi_ioctl()
504 rv = ipmi_get_my_address(priv->user, val.channel, &val.value); in ipmi_ioctl()
505 if (rv) in ipmi_ioctl()
509 rv = -EFAULT; in ipmi_ioctl()
520 rv = -EFAULT; in ipmi_ioctl()
524 rv = ipmi_set_my_LUN(priv->user, val.channel, val.value); in ipmi_ioctl()
533 rv = -EFAULT; in ipmi_ioctl()
537 rv = ipmi_get_my_LUN(priv->user, val.channel, &val.value); in ipmi_ioctl()
538 if (rv) in ipmi_ioctl()
542 rv = -EFAULT; in ipmi_ioctl()
553 rv = -EFAULT; in ipmi_ioctl()
561 rv = 0; in ipmi_ioctl()
575 rv = -EFAULT; in ipmi_ioctl()
579 rv = 0; in ipmi_ioctl()
589 rv = -EFAULT; in ipmi_ioctl()
592 rv = 0; in ipmi_ioctl()
601 rv = -EFAULT; in ipmi_ioctl()
604 rv = ipmi_set_maintenance_mode(priv->user, mode); in ipmi_ioctl()
609 rv = -ENOTTY; in ipmi_ioctl()
613 return rv; in ipmi_ioctl()
854 int rv; in init_ipmi_devintf() local
867 rv = register_chrdev(ipmi_major, DEVICE_NAME, &ipmi_fops); in init_ipmi_devintf()
868 if (rv < 0) { in init_ipmi_devintf()
871 return rv; in init_ipmi_devintf()
875 ipmi_major = rv; in init_ipmi_devintf()
878 rv = ipmi_smi_watcher_register(&smi_watcher); in init_ipmi_devintf()
879 if (rv) { in init_ipmi_devintf()
883 return rv; in init_ipmi_devintf()