| .. | .. |
|---|
| 299 | 299 | if (p_slot->status == 0xFF) { |
|---|
| 300 | 300 | /* power fault occurred, but it was benign */ |
|---|
| 301 | 301 | ctrl_dbg(ctrl, "%s: Power fault\n", __func__); |
|---|
| 302 | | - rc = POWER_FAILURE; |
|---|
| 303 | 302 | p_slot->status = 0; |
|---|
| 304 | 303 | goto err_exit; |
|---|
| 305 | 304 | } |
|---|
| .. | .. |
|---|
| 341 | 340 | u8 hp_slot; |
|---|
| 342 | 341 | int rc; |
|---|
| 343 | 342 | |
|---|
| 344 | | - if (shpchp_unconfigure_device(p_slot)) |
|---|
| 345 | | - return(1); |
|---|
| 343 | + shpchp_unconfigure_device(p_slot); |
|---|
| 346 | 344 | |
|---|
| 347 | 345 | hp_slot = p_slot->device - ctrl->slot_device_offset; |
|---|
| 348 | 346 | p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); |
|---|
| .. | .. |
|---|
| 446 | 444 | mutex_unlock(&p_slot->lock); |
|---|
| 447 | 445 | } |
|---|
| 448 | 446 | |
|---|
| 449 | | -static int update_slot_info (struct slot *slot) |
|---|
| 447 | +static void update_slot_info(struct slot *slot) |
|---|
| 450 | 448 | { |
|---|
| 451 | | - struct hotplug_slot_info *info; |
|---|
| 452 | | - int result; |
|---|
| 453 | | - |
|---|
| 454 | | - info = kmalloc(sizeof(*info), GFP_KERNEL); |
|---|
| 455 | | - if (!info) |
|---|
| 456 | | - return -ENOMEM; |
|---|
| 457 | | - |
|---|
| 458 | | - slot->hpc_ops->get_power_status(slot, &(info->power_status)); |
|---|
| 459 | | - slot->hpc_ops->get_attention_status(slot, &(info->attention_status)); |
|---|
| 460 | | - slot->hpc_ops->get_latch_status(slot, &(info->latch_status)); |
|---|
| 461 | | - slot->hpc_ops->get_adapter_status(slot, &(info->adapter_status)); |
|---|
| 462 | | - |
|---|
| 463 | | - result = pci_hp_change_slot_info(slot->hotplug_slot, info); |
|---|
| 464 | | - kfree (info); |
|---|
| 465 | | - return result; |
|---|
| 449 | + slot->hpc_ops->get_power_status(slot, &slot->pwr_save); |
|---|
| 450 | + slot->hpc_ops->get_attention_status(slot, &slot->attention_save); |
|---|
| 451 | + slot->hpc_ops->get_latch_status(slot, &slot->latch_save); |
|---|
| 452 | + slot->hpc_ops->get_adapter_status(slot, &slot->presence_save); |
|---|
| 466 | 453 | } |
|---|
| 467 | 454 | |
|---|
| 468 | 455 | /* |
|---|
| .. | .. |
|---|
| 654 | 641 | switch (p_slot->state) { |
|---|
| 655 | 642 | case BLINKINGON_STATE: |
|---|
| 656 | 643 | cancel_delayed_work(&p_slot->work); |
|---|
| 657 | | - /* fall through */ |
|---|
| 644 | + fallthrough; |
|---|
| 658 | 645 | case STATIC_STATE: |
|---|
| 659 | 646 | p_slot->state = POWERON_STATE; |
|---|
| 660 | 647 | mutex_unlock(&p_slot->lock); |
|---|
| .. | .. |
|---|
| 690 | 677 | switch (p_slot->state) { |
|---|
| 691 | 678 | case BLINKINGOFF_STATE: |
|---|
| 692 | 679 | cancel_delayed_work(&p_slot->work); |
|---|
| 693 | | - /* fall through */ |
|---|
| 680 | + fallthrough; |
|---|
| 694 | 681 | case STATIC_STATE: |
|---|
| 695 | 682 | p_slot->state = POWEROFF_STATE; |
|---|
| 696 | 683 | mutex_unlock(&p_slot->lock); |
|---|