summaryrefslogtreecommitdiff
path: root/drivers/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2007-10-18 00:04:06 -0700
committerKyle McMartin <kyle@shortfin.cabal.ca>2007-10-18 01:07:50 -0700
commit26f0324922e50e0ef7677aaf96287b862c2fec61 (patch)
treecaf0589db5e2f9ce9eaf96112e356344d5f88af3 /drivers/parisc
parent19c4d5664aaf9419dfe6b24990a93305fded6403 (diff)
downloadlwn-26f0324922e50e0ef7677aaf96287b862c2fec61.tar.gz
lwn-26f0324922e50e0ef7677aaf96287b862c2fec61.zip
[PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable
Failing to create the links doesn't seem like a fatal error in these paths. WARN_ON seems better than nothing though. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/pdc_stable.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index fc4bde259dc7..ebb09e98d215 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -282,6 +282,7 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
unsigned short i;
char in[count+1], *temp;
struct device *dev;
+ int ret;
if (!entry || !buf || !count)
return -EINVAL;
@@ -333,7 +334,9 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
/* Update the symlink to the real device */
sysfs_remove_link(&entry->kobj, "device");
- sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
+ ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
+ WARN_ON(ret);
+
write_unlock(&entry->rw_lock);
printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
@@ -1003,8 +1006,10 @@ pdcs_register_pathentries(void)
entry->ready = 2;
/* Add a nice symlink to the real device */
- if (entry->dev)
- sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
+ if (entry->dev) {
+ err = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
+ WARN_ON(err);
+ }
write_unlock(&entry->rw_lock);
}