firmware: hardcode the debug message for -ENOENT
When no file /path was found, the error code of -ENOENT enumerated in errno-base.h, is returned. Stating clearly that the file was not found is much more useful for debugging, So let's be explicit about that. Signed-off-by: John Zhao <yuankuiz@codeaurora.org> Acked-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a7013ba5a9
commit
eac473bce4
|
@ -328,12 +328,12 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv)
|
||||||
rc = kernel_read_file_from_path(path, &fw_priv->data, &size,
|
rc = kernel_read_file_from_path(path, &fw_priv->data, &size,
|
||||||
msize, id);
|
msize, id);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
if (rc == -ENOENT)
|
if (rc != -ENOENT)
|
||||||
dev_dbg(device, "loading %s failed with error %d\n",
|
|
||||||
path, rc);
|
|
||||||
else
|
|
||||||
dev_warn(device, "loading %s failed with error %d\n",
|
dev_warn(device, "loading %s failed with error %d\n",
|
||||||
path, rc);
|
path, rc);
|
||||||
|
else
|
||||||
|
dev_dbg(device, "loading %s failed for no such file or directory.\n",
|
||||||
|
path);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name);
|
dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name);
|
||||||
|
|
Loading…
Reference in New Issue