From: Dave Jones Date: Mon, 12 Jun 2006 12:20:58 +0000 (+0200) Subject: [PATCH] remove dead code from elevator switching X-Git-Tag: v2.6.18-rc1~1081^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=acf421755593f7d7bd9352d57eda796c6eb4fa43;p=platform%2Fkernel%2Flinux-3.10.git [PATCH] remove dead code from elevator switching We already drop the refcount in elevator_exit(), and as we're setting 'e' to NULL, we'll never take that branch anyway. Finally, as 'e' is a local var that isn't referenced afterwards, setting it to NULL is pointless. Signed-off-by: Dave Jones Signed-off-by: Jens Axboe --- diff --git a/block/elevator.c b/block/elevator.c index a0afdd3..d00b283 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -850,12 +850,9 @@ fail_register: * one again (along with re-adding the sysfs dir) */ elevator_exit(e); - e = NULL; q->elevator = old_elevator; elv_register_queue(q); clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags); - if (e) - kobject_put(&e->kobj); return 0; }