dm mpath: add m->hw_handler_name NULL pointer check in parse_hw_handler()
Avoids false positive of no hardware handler being specified (which is implied by a NULL m->hw_handler_name). Signed-off-by: tang.junhui <tang.junhui@zte.com.cn> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
bff7e067ee
commit
f97dc42128
|
@ -1002,6 +1002,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m)
|
|||
}
|
||||
|
||||
m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL);
|
||||
if (!m->hw_handler_name)
|
||||
return -EINVAL;
|
||||
|
||||
if (hw_argc > 1) {
|
||||
char *p;
|
||||
|
|
Loading…
Reference in New Issue