OSDN Git Service

Merge tag 'char-misc-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[tomoyo/tomoyo-test1.git] / drivers / bus / fsl-mc / dprc-driver.c
index ec5f26a..4b68c84 100644 (file)
@@ -841,15 +841,14 @@ EXPORT_SYMBOL_GPL(dprc_cleanup);
  * It tears down the interrupts that were configured for the DPRC device.
  * It destroys the interrupt pool associated with this MC bus.
  */
-static int dprc_remove(struct fsl_mc_device *mc_dev)
+static void dprc_remove(struct fsl_mc_device *mc_dev)
 {
        struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev);
 
-       if (!is_fsl_mc_bus_dprc(mc_dev))
-               return -EINVAL;
-
-       if (!mc_bus->irq_resources)
-               return -EINVAL;
+       if (!mc_bus->irq_resources) {
+               dev_err(&mc_dev->dev, "No irq resources, so unbinding the device failed\n");
+               return;
+       }
 
        if (dev_get_msi_domain(&mc_dev->dev))
                dprc_teardown_irq(mc_dev);
@@ -859,7 +858,6 @@ static int dprc_remove(struct fsl_mc_device *mc_dev)
        dprc_cleanup(mc_dev);
 
        dev_info(&mc_dev->dev, "DPRC device unbound from driver");
-       return 0;
 }
 
 static const struct fsl_mc_device_id match_id_table[] = {