diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2007-01-26 17:08:46 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-27 11:05:29 -0500 |
commit | 21434966462d57145c861b43f6206d945ac57630 (patch) | |
tree | d28775f7e582699cd96bfe434e43054e07c4eb0a /drivers/scsi/scsi_transport_sas.c | |
parent | 6f63caae2172e97e528b58319480217b0b36542e (diff) |
[SCSI] libsas: Check return values of sysfs_create_link
Get rid of: "warning: ignoring return value of sysfs_create_link..."
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_sas.c')
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 010845fd2b85..6d39150e205b 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -625,8 +625,19 @@ static void sas_port_release(struct device *dev) | |||
625 | static void sas_port_create_link(struct sas_port *port, | 625 | static void sas_port_create_link(struct sas_port *port, |
626 | struct sas_phy *phy) | 626 | struct sas_phy *phy) |
627 | { | 627 | { |
628 | sysfs_create_link(&port->dev.kobj, &phy->dev.kobj, phy->dev.bus_id); | 628 | int res; |
629 | sysfs_create_link(&phy->dev.kobj, &port->dev.kobj, "port"); | 629 | |
630 | res = sysfs_create_link(&port->dev.kobj, &phy->dev.kobj, | ||
631 | phy->dev.bus_id); | ||
632 | if (res) | ||
633 | goto err; | ||
634 | res = sysfs_create_link(&phy->dev.kobj, &port->dev.kobj, "port"); | ||
635 | if (res) | ||
636 | goto err; | ||
637 | return; | ||
638 | err: | ||
639 | printk(KERN_ERR "%s: Cannot create port links, err=%d\n", | ||
640 | __FUNCTION__, res); | ||
630 | } | 641 | } |
631 | 642 | ||
632 | static void sas_port_delete_link(struct sas_port *port, | 643 | static void sas_port_delete_link(struct sas_port *port, |
@@ -864,13 +875,20 @@ EXPORT_SYMBOL(sas_port_delete_phy); | |||
864 | 875 | ||
865 | void sas_port_mark_backlink(struct sas_port *port) | 876 | void sas_port_mark_backlink(struct sas_port *port) |
866 | { | 877 | { |
878 | int res; | ||
867 | struct device *parent = port->dev.parent->parent->parent; | 879 | struct device *parent = port->dev.parent->parent->parent; |
868 | 880 | ||
869 | if (port->is_backlink) | 881 | if (port->is_backlink) |
870 | return; | 882 | return; |
871 | port->is_backlink = 1; | 883 | port->is_backlink = 1; |
872 | sysfs_create_link(&port->dev.kobj, &parent->kobj, | 884 | res = sysfs_create_link(&port->dev.kobj, &parent->kobj, |
873 | parent->bus_id); | 885 | parent->bus_id); |
886 | if (res) | ||
887 | goto err; | ||
888 | return; | ||
889 | err: | ||
890 | printk(KERN_ERR "%s: Cannot create port backlink, err=%d\n", | ||
891 | __FUNCTION__, res); | ||
874 | 892 | ||
875 | } | 893 | } |
876 | EXPORT_SYMBOL(sas_port_mark_backlink); | 894 | EXPORT_SYMBOL(sas_port_mark_backlink); |