nfblock.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) nfblock.c (8b9ab62662048a3274361c7e5f64037c2c133e2c)
1/*
2 * ARAnyM block device driver
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file COPYING in the main directory of this archive
6 * for more details.
7 */
8

--- 124 unchanged lines hidden (view full) ---

133 if (err)
134 goto out_cleanup_disk;
135
136 list_add_tail(&dev->list, &nfhd_list);
137
138 return 0;
139
140out_cleanup_disk:
1/*
2 * ARAnyM block device driver
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file COPYING in the main directory of this archive
6 * for more details.
7 */
8

--- 124 unchanged lines hidden (view full) ---

133 if (err)
134 goto out_cleanup_disk;
135
136 list_add_tail(&dev->list, &nfhd_list);
137
138 return 0;
139
140out_cleanup_disk:
141 blk_cleanup_disk(dev->disk);
141 put_disk(dev->disk);
142free_dev:
143 kfree(dev);
144out:
145 return err;
146}
147
148static int __init nfhd_init(void)
149{

--- 25 unchanged lines hidden (view full) ---

175
176static void __exit nfhd_exit(void)
177{
178 struct nfhd_device *dev, *next;
179
180 list_for_each_entry_safe(dev, next, &nfhd_list, list) {
181 list_del(&dev->list);
182 del_gendisk(dev->disk);
142free_dev:
143 kfree(dev);
144out:
145 return err;
146}
147
148static int __init nfhd_init(void)
149{

--- 25 unchanged lines hidden (view full) ---

175
176static void __exit nfhd_exit(void)
177{
178 struct nfhd_device *dev, *next;
179
180 list_for_each_entry_safe(dev, next, &nfhd_list, list) {
181 list_del(&dev->list);
182 del_gendisk(dev->disk);
183 blk_cleanup_disk(dev->disk);
183 put_disk(dev->disk);
184 kfree(dev);
185 }
186 unregister_blkdev(major_num, "nfhd");
187}
188
189module_init(nfhd_init);
190module_exit(nfhd_exit);
191
192MODULE_LICENSE("GPL");
184 kfree(dev);
185 }
186 unregister_blkdev(major_num, "nfhd");
187}
188
189module_init(nfhd_init);
190module_exit(nfhd_exit);
191
192MODULE_LICENSE("GPL");