Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / pci / hotplug / shpchp_ctrl.c
index b8ab2796e66af83d42dc3f2112f7bd3ca6a651bf..3bba0c0888ff180100d1d8ee1c2e58cbcf5dda73 100644 (file)
@@ -285,17 +285,8 @@ static int board_added(struct slot *p_slot)
                return WRONG_BUS_FREQUENCY;
        }
 
-       rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bsp);
-       if (rc) {
-               ctrl_err(ctrl, "Can't get bus operation speed\n");
-               return WRONG_BUS_FREQUENCY;
-       }
-
-       rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &msp);
-       if (rc) {
-               ctrl_err(ctrl, "Can't get max bus operation speed\n");
-               msp = bsp;
-       }
+       bsp = ctrl->pci_dev->bus->cur_bus_speed;
+       msp = ctrl->pci_dev->bus->max_bus_speed;
 
        /* Check if there are other slots or devices on the same bus */
        if (!list_empty(&ctrl->pci_dev->subordinate->devices))
@@ -462,6 +453,7 @@ void shpchp_queue_pushbutton_work(struct work_struct *work)
                p_slot->state = POWERON_STATE;
                break;
        default:
+               kfree(info);
                goto out;
        }
        queue_work(shpchp_wq, &info->work);