Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mcheha...
[pandora-kernel.git] / drivers / scsi / scsi_sysfs.c
index 429c9b7..c23ab97 100644 (file)
@@ -474,7 +474,7 @@ static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL);
 
 
 /*
- * sdev_rd_attr: create a function and attribute variable for a
+ * sdev_rw_attr: create a function and attribute variable for a
  * read/write field.
  */
 #define sdev_rw_attr(field, format_string)                             \
@@ -486,7 +486,7 @@ sdev_store_##field (struct device *dev, struct device_attribute *attr,      \
 {                                                                      \
        struct scsi_device *sdev;                                       \
        sdev = to_scsi_device(dev);                                     \
-       snscanf (buf, 20, format_string, &sdev->field);                 \
+       sscanf (buf, format_string, &sdev->field);                      \
        return count;                                                   \
 }                                                                      \
 static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field);
@@ -853,9 +853,6 @@ static int scsi_target_add(struct scsi_target *starget)
        error = device_add(&starget->dev);
        if (error) {
                dev_err(&starget->dev, "target device_add failed, error %d\n", error);
-               get_device(&starget->dev);
-               scsi_target_reap(starget);
-               put_device(&starget->dev);
                return error;
        }
        transport_add_device(&starget->dev);