@@ -130,13 +130,7 @@ static int ehci_atmel_probe(struct udevice *dev)
static int ehci_atmel_remove(struct udevice *dev)
{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return ehci_deregister(dev);
}
static const struct udevice_id ehci_usb_ids[] = {
@@ -120,13 +120,7 @@ static int ehci_fsl_probe(struct udevice *dev)
static int ehci_fsl_remove(struct udevice *dev)
{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return ehci_deregister(dev);
}
static const struct udevice_id ehci_usb_ids[] = {
@@ -96,13 +96,7 @@ static int ehci_mvebu_probe(struct udevice *dev)
static int ehci_mvebu_remove(struct udevice *dev)
{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return ehci_deregister(dev);
}
static const struct udevice_id ehci_usb_ids[] = {
@@ -453,13 +453,7 @@ static int ehci_usb_probe(struct udevice *dev)
static int ehci_usb_remove(struct udevice *dev)
{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return ehci_deregister(dev);
}
static const struct udevice_id mx6_usb_ids[] = {
@@ -128,13 +128,7 @@ static int ehci_pci_probe(struct udevice *dev)
static int ehci_pci_remove(struct udevice *dev)
{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return ehci_deregister(dev);
}
static const struct udevice_id ehci_pci_ids[] = {
@@ -75,13 +75,7 @@ static int ehci_zynq_probe(struct udevice *dev)
static int ehci_zynq_remove(struct udevice *dev)
{
- int ret;
-
- ret = ehci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return ehci_deregister(dev);
}
static const struct udevice_id ehci_zynq_ids[] = {
@@ -129,15 +129,10 @@ static int xhci_fsl_probe(struct udevice *dev)
static int xhci_fsl_remove(struct udevice *dev)
{
struct xhci_fsl_priv *priv = dev_get_priv(dev);
- int ret;
fsl_xhci_core_exit(&priv->ctx);
- ret = xhci_deregister(dev);
- if (ret)
- return ret;
-
- return 0;
+ return xhci_deregister(dev);
}
static const struct udevice_id xhci_usb_ids[] = {
ehci_*_remove() is just a wrapper of ehci_deregister(). xhci_fsl_remove() can be simpler as well. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/usb/host/ehci-atmel.c | 8 +------- drivers/usb/host/ehci-fsl.c | 8 +------- drivers/usb/host/ehci-marvell.c | 8 +------- drivers/usb/host/ehci-mx6.c | 8 +------- drivers/usb/host/ehci-pci.c | 8 +------- drivers/usb/host/ehci-zynq.c | 8 +------- drivers/usb/host/xhci-fsl.c | 7 +------ 7 files changed, 7 insertions(+), 48 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot