aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rapidio/rio-scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index a50391b6ba2a..3a59d5f018d3 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -517,7 +517,7 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net,
517 return rdev; 517 return rdev;
518 518
519cleanup: 519cleanup:
520 if (rswitch->route_table) 520 if (rio_is_switch(rdev))
521 kfree(rswitch->route_table); 521 kfree(rswitch->route_table);
522 522
523 kfree(rdev); 523 kfree(rdev);