Commit 26f03249 authored by Kyle McMartin's avatar Kyle McMartin Committed by Kyle McMartin

[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: default avatarKyle McMartin <kyle@mcmartin.ca>
parent 19c4d566
...@@ -282,6 +282,7 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun ...@@ -282,6 +282,7 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
unsigned short i; unsigned short i;
char in[count+1], *temp; char in[count+1], *temp;
struct device *dev; struct device *dev;
int ret;
if (!entry || !buf || !count) if (!entry || !buf || !count)
return -EINVAL; return -EINVAL;
...@@ -333,7 +334,9 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun ...@@ -333,7 +334,9 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
/* Update the symlink to the real device */ /* Update the symlink to the real device */
sysfs_remove_link(&entry->kobj, "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); write_unlock(&entry->rw_lock);
printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n", printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
...@@ -1003,8 +1006,10 @@ pdcs_register_pathentries(void) ...@@ -1003,8 +1006,10 @@ pdcs_register_pathentries(void)
entry->ready = 2; entry->ready = 2;
/* Add a nice symlink to the real device */ /* Add a nice symlink to the real device */
if (entry->dev) if (entry->dev) {
sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); err = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
WARN_ON(err);
}
write_unlock(&entry->rw_lock); write_unlock(&entry->rw_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment