/* Construct the path of the file that will give us the DT location */
path = g_strdup_printf("/sys/bus/pci/devices/%s/devspec", host);
g_free(host);
- if (!path || !g_file_get_contents(path, &buf, NULL, NULL)) {
+ if (!g_file_get_contents(path, &buf, NULL, NULL)) {
goto err_out;
}
g_free(path);
/* Construct and read from host device tree the loc-code */
path = g_strdup_printf("/proc/device-tree%s/ibm,loc-code", buf);
g_free(buf);
- if (!path || !g_file_get_contents(path, &buf, NULL, NULL)) {
+ if (!g_file_get_contents(path, &buf, NULL, NULL)) {
goto err_out;
}
return buf;