]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/transport_class.c
[SCSI] transport_class: BUG if we can't release the attribute container
[linux-2.6-omap-h63xx.git] / drivers / base / transport_class.c
index f25e7c6b2d27301990eb6bc133015b5889a754e9..cabd0edf21569c3ea1cd2f3da9c77bfd5007936c 100644 (file)
@@ -108,7 +108,8 @@ EXPORT_SYMBOL_GPL(anon_transport_class_register);
  */
 void anon_transport_class_unregister(struct anon_transport_class *atc)
 {
-       attribute_container_unregister(&atc->container);
+       if (unlikely(attribute_container_unregister(&atc->container)))
+               BUG();
 }
 EXPORT_SYMBOL_GPL(anon_transport_class_unregister);
 
@@ -126,9 +127,7 @@ static int transport_setup_classdev(struct attribute_container *cont,
 }
 
 /**
- * transport_setup_device - declare a new dev for transport class association
- *                         but don't make it visible yet.
- *
+ * transport_setup_device - declare a new dev for transport class association but don't make it visible yet.
  * @dev: the generic device representing the entity being added
  *
  * Usually, dev represents some component in the HBA system (either