X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fs390%2Fscsi%2Fzfcp_sysfs_port.c;h=11a27c1ff32ab789aa469ba9a6647775a62633ac;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=e0ace9349c70580225b18c984133d2f23f2581ff;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c index e0ace9349..11a27c1ff 100644 --- a/drivers/s390/scsi/zfcp_sysfs_port.c +++ b/drivers/s390/scsi/zfcp_sysfs_port.c @@ -26,7 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.40 $" +#define ZFCP_SYSFS_PORT_C_REVISION "$Revision: 1.41 $" #include "zfcp_ext.h" @@ -125,7 +125,7 @@ zfcp_sysfs_unit_remove_store(struct device *dev, const char *buf, size_t count) struct zfcp_unit *unit; fcp_lun_t fcp_lun; char *endp; - int retval = -EINVAL; + int retval = 0; down(&zfcp_data.config_sema); @@ -136,8 +136,10 @@ zfcp_sysfs_unit_remove_store(struct device *dev, const char *buf, size_t count) } fcp_lun = simple_strtoull(buf, &endp, 0); - if ((endp + 1) < (buf + count)) + if ((endp + 1) < (buf + count)) { + retval = -EINVAL; goto out; + } write_lock_irq(&zfcp_data.config_lock); unit = zfcp_get_unit_by_lun(port, fcp_lun);