aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
282 unsigned short i; 282 unsigned short i;
283 char in[count+1], *temp; 283 char in[count+1], *temp;
284 struct device *dev; 284 struct device *dev;
285 int ret;
285 286
286 if (!entry || !buf || !count) 287 if (!entry || !buf || !count)
287 return -EINVAL; 288 return -EINVAL;
@@ -333,7 +334,9 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
333 334
334 /* Update the symlink to the real device */ 335 /* Update the symlink to the real device */
335 sysfs_remove_link(&entry->kobj, "device"); 336 sysfs_remove_link(&entry->kobj, "device");
336 sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); 337 ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
338 WARN_ON(ret);
339
337 write_unlock(&entry->rw_lock); 340 write_unlock(&entry->rw_lock);
338 341
339 printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n", 342 printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
@@ -1003,8 +1006,10 @@ pdcs_register_pathentries(void)
1003 entry->ready = 2; 1006 entry->ready = 2;
1004 1007
1005 /* Add a nice symlink to the real device */ 1008 /* Add a nice symlink to the real device */
1006 if (entry->dev) 1009 if (entry->dev) {
1007 sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); 1010 err = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
1011 WARN_ON(err);
1012 }
1008 1013
1009 write_unlock(&entry->rw_lock); 1014 write_unlock(&entry->rw_lock);
1010 } 1015 }