diff options
Diffstat (limited to 'drivers/rapidio/rio-scan.c')
-rw-r--r-- | drivers/rapidio/rio-scan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index ebe77dd87daf..2bebd791a092 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c | |||
@@ -516,7 +516,7 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net, | |||
516 | return rdev; | 516 | return rdev; |
517 | 517 | ||
518 | cleanup: | 518 | cleanup: |
519 | if (rio_is_switch(rdev)) | 519 | if (rswitch) |
520 | kfree(rswitch->route_table); | 520 | kfree(rswitch->route_table); |
521 | 521 | ||
522 | kfree(rdev); | 522 | kfree(rdev); |
@@ -923,7 +923,7 @@ static int __devinit rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
923 | * rio_enum_complete- Tests if enumeration of a network is complete | 923 | * rio_enum_complete- Tests if enumeration of a network is complete |
924 | * @port: Master port to send transaction | 924 | * @port: Master port to send transaction |
925 | * | 925 | * |
926 | * Tests the Component Tag CSR for non-zero value (enumeration | 926 | * Tests the PGCCSR discovered bit for non-zero value (enumeration |
927 | * complete flag). Return %1 if enumeration is complete or %0 if | 927 | * complete flag). Return %1 if enumeration is complete or %0 if |
928 | * enumeration is incomplete. | 928 | * enumeration is incomplete. |
929 | */ | 929 | */ |
@@ -933,7 +933,7 @@ static int rio_enum_complete(struct rio_mport *port) | |||
933 | 933 | ||
934 | rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR, | 934 | rio_local_read_config_32(port, port->phys_efptr + RIO_PORT_GEN_CTL_CSR, |
935 | ®val); | 935 | ®val); |
936 | return (regval & RIO_PORT_GEN_MASTER) ? 1 : 0; | 936 | return (regval & RIO_PORT_GEN_DISCOVERED) ? 1 : 0; |
937 | } | 937 | } |
938 | 938 | ||
939 | /** | 939 | /** |