[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>
This commit is contained in:
parent
6f63caae21
commit
2143496646
1 changed files with 22 additions and 4 deletions
|
@ -625,8 +625,19 @@ static void sas_port_release(struct device *dev)
|
||||||
static void sas_port_create_link(struct sas_port *port,
|
static void sas_port_create_link(struct sas_port *port,
|
||||||
struct sas_phy *phy)
|
struct sas_phy *phy)
|
||||||
{
|
{
|
||||||
sysfs_create_link(&port->dev.kobj, &phy->dev.kobj, phy->dev.bus_id);
|
int res;
|
||||||
sysfs_create_link(&phy->dev.kobj, &port->dev.kobj, "port");
|
|
||||||
|
res = sysfs_create_link(&port->dev.kobj, &phy->dev.kobj,
|
||||||
|
phy->dev.bus_id);
|
||||||
|
if (res)
|
||||||
|
goto err;
|
||||||
|
res = sysfs_create_link(&phy->dev.kobj, &port->dev.kobj, "port");
|
||||||
|
if (res)
|
||||||
|
goto err;
|
||||||
|
return;
|
||||||
|
err:
|
||||||
|
printk(KERN_ERR "%s: Cannot create port links, err=%d\n",
|
||||||
|
__FUNCTION__, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sas_port_delete_link(struct sas_port *port,
|
static void sas_port_delete_link(struct sas_port *port,
|
||||||
|
@ -864,13 +875,20 @@ EXPORT_SYMBOL(sas_port_delete_phy);
|
||||||
|
|
||||||
void sas_port_mark_backlink(struct sas_port *port)
|
void sas_port_mark_backlink(struct sas_port *port)
|
||||||
{
|
{
|
||||||
|
int res;
|
||||||
struct device *parent = port->dev.parent->parent->parent;
|
struct device *parent = port->dev.parent->parent->parent;
|
||||||
|
|
||||||
if (port->is_backlink)
|
if (port->is_backlink)
|
||||||
return;
|
return;
|
||||||
port->is_backlink = 1;
|
port->is_backlink = 1;
|
||||||
sysfs_create_link(&port->dev.kobj, &parent->kobj,
|
res = sysfs_create_link(&port->dev.kobj, &parent->kobj,
|
||||||
parent->bus_id);
|
parent->bus_id);
|
||||||
|
if (res)
|
||||||
|
goto err;
|
||||||
|
return;
|
||||||
|
err:
|
||||||
|
printk(KERN_ERR "%s: Cannot create port backlink, err=%d\n",
|
||||||
|
__FUNCTION__, res);
|
||||||
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(sas_port_mark_backlink);
|
EXPORT_SYMBOL(sas_port_mark_backlink);
|
||||||
|
|
Loading…
Reference in a new issue