Skip to content

Commit

Permalink
PCI: pciehp: Make queue_interrupt_event() void
Browse files Browse the repository at this point in the history
Nobody looks at the return value from queue_interrupt_event(), so errors
were silently ignored.  Convert it to a "void" function and note the error
in the dmesg log.

No functional change except the new message.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rajat Jain <rajatja@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
  • Loading branch information
Bjorn Helgaas committed Jun 18, 2015
1 parent 3784e0c commit 7d852b6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/pci/hotplug/pciehp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,20 @@

static void interrupt_event_handler(struct work_struct *work);

static int queue_interrupt_event(struct slot *p_slot, u32 event_type)
static void queue_interrupt_event(struct slot *p_slot, u32 event_type)
{
struct event_info *info;

info = kmalloc(sizeof(*info), GFP_ATOMIC);
if (!info)
return -ENOMEM;
if (!info) {
ctrl_err(p_slot->ctrl, "dropped event %d (ENOMEM)\n", event_type);
return;
}

INIT_WORK(&info->work, interrupt_event_handler);
info->event_type = event_type;
info->p_slot = p_slot;
INIT_WORK(&info->work, interrupt_event_handler);

queue_work(p_slot->wq, &info->work);

return 0;
}

u8 pciehp_handle_attention_button(struct slot *p_slot)
Expand Down

0 comments on commit 7d852b6

Please sign in to comment.