Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-4.18-2' of git://github.com/cminyard/linux-ipmi

Pull IPMI fixes from Corey Minyard:
"A couple of small fixes: one to the BMC side of things that fixes an
interrupt issue, and one oops fix if init fails in a certain way on
the client driver"

* tag 'for-linus-4.18-2' of git://github.com/cminyard/linux-ipmi:
ipmi: kcs_bmc: fix IRQ exception if the channel is not open
ipmi: Cleanup oops on initialization failure

+15 -24
+4 -2
drivers/char/ipmi/ipmi_si_intf.c
··· 2088 2088 return 0; 2089 2089 2090 2090 out_err: 2091 - ipmi_unregister_smi(new_smi->intf); 2092 - new_smi->intf = NULL; 2091 + if (new_smi->intf) { 2092 + ipmi_unregister_smi(new_smi->intf); 2093 + new_smi->intf = NULL; 2094 + } 2093 2095 2094 2096 kfree(init_name); 2095 2097
+11 -22
drivers/char/ipmi/kcs_bmc.c
··· 210 210 int kcs_bmc_handle_event(struct kcs_bmc *kcs_bmc) 211 211 { 212 212 unsigned long flags; 213 - int ret = 0; 213 + int ret = -ENODATA; 214 214 u8 status; 215 215 216 216 spin_lock_irqsave(&kcs_bmc->lock, flags); 217 217 218 - if (!kcs_bmc->running) { 219 - kcs_force_abort(kcs_bmc); 220 - ret = -ENODEV; 221 - goto out_unlock; 218 + status = read_status(kcs_bmc); 219 + if (status & KCS_STATUS_IBF) { 220 + if (!kcs_bmc->running) 221 + kcs_force_abort(kcs_bmc); 222 + else if (status & KCS_STATUS_CMD_DAT) 223 + kcs_bmc_handle_cmd(kcs_bmc); 224 + else 225 + kcs_bmc_handle_data(kcs_bmc); 226 + 227 + ret = 0; 222 228 } 223 229 224 - status = read_status(kcs_bmc) & (KCS_STATUS_IBF | KCS_STATUS_CMD_DAT); 225 - 226 - switch (status) { 227 - case KCS_STATUS_IBF | KCS_STATUS_CMD_DAT: 228 - kcs_bmc_handle_cmd(kcs_bmc); 229 - break; 230 - 231 - case KCS_STATUS_IBF: 232 - kcs_bmc_handle_data(kcs_bmc); 233 - break; 234 - 235 - default: 236 - ret = -ENODATA; 237 - break; 238 - } 239 - 240 - out_unlock: 241 230 spin_unlock_irqrestore(&kcs_bmc->lock, flags); 242 231 243 232 return ret;