drivers/cdrom/gdrom.c: fix device number leak
authorLibo Chen <clbchenlibo.chen@huawei.com>
Wed, 3 Jul 2013 22:01:11 +0000 (15:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:25 +0000 (16:07 -0700)
commit31bd8fbb41b1fdf61f80e3e506574b43fad5e478
tree56461ec00eedf7f200e10166e59624170f476eaf
parent4a184b4ff424e544359f081087723fc36efe603e
drivers/cdrom/gdrom.c: fix device number leak

Without this patch, gdrom_major will leak when gd.cd_info alloc fails.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Cc: Jens Axboe <axboe@kernel.dk>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/cdrom/gdrom.c