]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix return value of board_mode store routine in case of online failure
authorJames Smart <jsmart2021@gmail.com>
Fri, 2 Jun 2017 04:07:03 +0000 (21:07 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 01:37:31 +0000 (21:37 -0400)
commitb4e5ecd0dc03934fca5ef0cb3561e5cf65af836e
tree3454f20ac50efff3efb0eba719c65e2b2eea4d23
parent118e9376bb28fa12f043163b4a6f8b988e02bebf
scsi: lpfc: Fix return value of board_mode store routine in case of online failure

On hbacmd reset failure, observing wrong string "nline" in kernel log.

On failure, non negative value (1) is returned from sysfs store
routine. It is interpreted as count by kernel and store routine is
called again with the remaining characters as input.

Fix: Return negative error code (-EIO) in case of failure.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c