diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-01-10 11:28:27 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-01-23 06:31:00 -0500 |
commit | 3e204dfcaff0e7f6c4d9873fb8c9d948ec5ab2da (patch) | |
tree | 77d823df1360861fb4edd7cdf0549ea849c8a001 /drivers/firewire | |
parent | f117a3e3004381ccadadc5156178c283815ca393 (diff) |
firewire: cdev: remove unneeded idr_find() from complete_transaction()
Outbound transactions are never aborted with release_client_resource(),
so it is not necessary for complete_transaction() to check whether the
resource is still registered. Only shutdown_resource() can abort such
an transaction, and this is already handled with the in_shutdown check.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/core-cdev.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 48ae712e2101..4434f7ca11d5 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c | |||
@@ -544,14 +544,8 @@ static void complete_transaction(struct fw_card *card, int rcode, | |||
544 | * 1. If called while in shutdown, the idr tree must be left untouched. | 544 | * 1. If called while in shutdown, the idr tree must be left untouched. |
545 | * The idr handle will be removed and the client reference will be | 545 | * The idr handle will be removed and the client reference will be |
546 | * dropped later. | 546 | * dropped later. |
547 | * 2. If the call chain was release_client_resource -> | ||
548 | * release_transaction -> complete_transaction (instead of a normal | ||
549 | * conclusion of the transaction), i.e. if this resource was already | ||
550 | * unregistered from the idr, the client reference will be dropped | ||
551 | * by release_client_resource and we must not drop it here. | ||
552 | */ | 547 | */ |
553 | if (!client->in_shutdown && | 548 | if (!client->in_shutdown) { |
554 | idr_find(&client->resource_idr, e->r.resource.handle)) { | ||
555 | idr_remove(&client->resource_idr, e->r.resource.handle); | 549 | idr_remove(&client->resource_idr, e->r.resource.handle); |
556 | /* Drop the idr's reference */ | 550 | /* Drop the idr's reference */ |
557 | client_put(client); | 551 | client_put(client); |