projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libnvdimm/label: Return -ENXIO for no slot in __blk_label_update
[linux-2.6-microblaze.git]
/
drivers
/
nvdimm
/
label.c
diff --git
a/drivers/nvdimm/label.c
b/drivers/nvdimm/label.c
index
6f2be7a
..
9251441
100644
(file)
--- a/
drivers/nvdimm/label.c
+++ b/
drivers/nvdimm/label.c
@@
-1008,8
+1008,10
@@
static int __blk_label_update(struct nd_region *nd_region,
if (is_old_resource(res, old_res_list, old_num_resources))
continue; /* carry-over */
slot = nd_label_alloc_slot(ndd);
if (is_old_resource(res, old_res_list, old_num_resources))
continue; /* carry-over */
slot = nd_label_alloc_slot(ndd);
- if (slot == UINT_MAX)
+ if (slot == UINT_MAX) {
+ rc = -ENXIO;
goto abort;
goto abort;
+ }
dev_dbg(ndd->dev, "allocated: %d\n", slot);
nd_label = to_label(ndd, slot);
dev_dbg(ndd->dev, "allocated: %d\n", slot);
nd_label = to_label(ndd, slot);