mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
3600965 move the initialization past the null intf check
This commit is contained in:
parent
75d6c72c5d
commit
9a8a8b7dad
@ -144,7 +144,6 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
};
|
||||
struct ipmi_ipmb_addr ipmb_addr = {
|
||||
addr_type: IPMI_IPMB_ADDR_TYPE,
|
||||
channel: intf->target_channel & 0x0f,
|
||||
};
|
||||
struct ipmi_req _req;
|
||||
static struct ipmi_rs rsp;
|
||||
@ -158,6 +157,8 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
if (intf == NULL || req == NULL)
|
||||
return NULL;
|
||||
|
||||
ipmb_addr.channel = intf->target_channel & 0x0f;
|
||||
|
||||
if (intf->opened == 0 && intf->open != NULL)
|
||||
if (intf->open(intf) < 0)
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user