linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] scsi: Add error checking to sysfs_update_group in drivers/scsi/scsi_transport_spi.c
@ 2023-03-02 18:37 Nur Hussein
  0 siblings, 0 replies; only message in thread
From: Nur Hussein @ 2023-03-02 18:37 UTC (permalink / raw)
  To: jejb, martin.petersen, linux-scsi, linux-kernel; +Cc: Nur Hussein

An instance of sysfs_update_group now checks the result and on error,
logs it via pr_err().

Signed-off-by: Nur Hussein <hussein@unixcat.org>
---
 drivers/scsi/scsi_transport_spi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index 2442d4d2e3f3..f905b4787a42 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -1559,8 +1559,9 @@ static int spi_target_configure(struct transport_container *tc,
 {
 	struct kobject *kobj = &cdev->kobj;
 
-	/* force an update based on parameters read from the device */
-	sysfs_update_group(kobj, &target_attribute_group);
+	/* force an update based on parameters read from the device, log an error on failure */
+	if (sysfs_update_group(kobj, &target_attribute_group))
+		pr_err("Unable to update sysfs entries\n");
 
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-02 18:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 18:37 [PATCH RESEND] scsi: Add error checking to sysfs_update_group in drivers/scsi/scsi_transport_spi.c Nur Hussein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).