Merge branch 'v5.16/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic...
[linux-2.6-microblaze.git] / drivers / scsi / scsi_sysfs.c
index 7afcec2..d4edce9 100644 (file)
@@ -812,7 +812,7 @@ store_state_field(struct device *dev, struct device_attribute *attr,
 
        mutex_lock(&sdev->state_mutex);
        if (sdev->sdev_state == SDEV_RUNNING && state == SDEV_RUNNING) {
-               ret = count;
+               ret = 0;
        } else {
                ret = scsi_device_set_state(sdev, state);
                if (ret == 0 && state == SDEV_RUNNING)