diff options
Diffstat (limited to 'drivers/pci/hotplug/rpadlpar_sysfs.c')
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c index 752e6513c447..db69be85b458 100644 --- a/drivers/pci/hotplug/rpadlpar_sysfs.c +++ b/drivers/pci/hotplug/rpadlpar_sysfs.c | |||
@@ -62,7 +62,7 @@ static ssize_t add_slot_store(struct dlpar_io_attr *dlpar_attr, | |||
62 | char drc_name[MAX_DRC_NAME_LEN]; | 62 | char drc_name[MAX_DRC_NAME_LEN]; |
63 | char *end; | 63 | char *end; |
64 | 64 | ||
65 | if (nbytes > MAX_DRC_NAME_LEN) | 65 | if (nbytes >= MAX_DRC_NAME_LEN) |
66 | return 0; | 66 | return 0; |
67 | 67 | ||
68 | memcpy(drc_name, buf, nbytes); | 68 | memcpy(drc_name, buf, nbytes); |
@@ -83,7 +83,7 @@ static ssize_t remove_slot_store(struct dlpar_io_attr *dlpar_attr, | |||
83 | char drc_name[MAX_DRC_NAME_LEN]; | 83 | char drc_name[MAX_DRC_NAME_LEN]; |
84 | char *end; | 84 | char *end; |
85 | 85 | ||
86 | if (nbytes > MAX_DRC_NAME_LEN) | 86 | if (nbytes >= MAX_DRC_NAME_LEN) |
87 | return 0; | 87 | return 0; |
88 | 88 | ||
89 | memcpy(drc_name, buf, nbytes); | 89 | memcpy(drc_name, buf, nbytes); |