summaryrefslogtreecommitdiff
path: root/drivers/net/fm/init.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-07-28 14:54:29 -0400
committerTom Rini <trini@ti.com>2014-07-28 14:54:29 -0400
commitd5f8a6ddd41dee0de17888f8b5334fe1b636c4ca (patch)
tree1df8ab92fd228598d5884db37cceddcb18a0c020 /drivers/net/fm/init.c
parentee860c60d2c5283c009f7ea740c6ee706da87cb7 (diff)
parentfb5368789a45ca5ee4396cbbf563a8f16ab24f9c (diff)
downloadu-boot-imx-d5f8a6ddd41dee0de17888f8b5334fe1b636c4ca.zip
u-boot-imx-d5f8a6ddd41dee0de17888f8b5334fe1b636c4ca.tar.gz
u-boot-imx-d5f8a6ddd41dee0de17888f8b5334fe1b636c4ca.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'drivers/net/fm/init.c')
-rw-r--r--drivers/net/fm/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index cd787f4..ff04695 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -147,6 +147,9 @@ void fm_disable_port(enum fm_port port)
{
int i = fm_port_to_index(port);
+ if (i == -1)
+ return;
+
fm_info[i].enabled = 0;
fman_disable_port(port);
}
@@ -155,6 +158,9 @@ void fm_enable_port(enum fm_port port)
{
int i = fm_port_to_index(port);
+ if (i == -1)
+ return;
+
fm_info[i].enabled = 1;
fman_enable_port(port);
}