]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lpfc: Fix return value of board_mode store
authorJames Smart <james.smart@broadcom.com>
Wed, 12 Jul 2017 22:50:12 +0000 (18:50 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 14 Jul 2017 00:14:10 +0000 (17:14 -0700)
commitf990a4873e294e482a207ac36cc99b194958be9c
tree5abdcd942f3a934ed3e80949f737b8a8422eca80
parent99c229470c84fe21d6b02dec6a00d7fe4075bc94
lpfc: Fix return value of board_mode store

[backport of b18f2a8765fc072701452f710ac164d243ee4579]
From: rkennedy <dick.kennedy@avagotech.com>

Orabug: 26439257

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>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c