Pathinfo might fail, which indicates that the path is not
available anymore. So check the return value and take
appropriate action.
Signed-off-by: Hannes Reinecke <hare@suse.de>
return PATH_DOWN;
}
-extern int
+int
sysfs_pathinfo(struct path * pp)
{
if (common_sysfs_pathinfo(pp))
if (!find_path_by_dev(mpp->paths, pp->dev) &&
store_path(mpp->paths, pp))
return 1;
- if (get_info)
- pathinfo(pp, conf->hwtable,
- DI_PRIO | DI_CHECKER);
+ if (get_info && pathinfo(pp, conf->hwtable,
+ DI_PRIO | DI_CHECKER))
+ return 1;
}
}
return 0;