mirror of https://github.com/torvalds/linux.git
firmware_loader: Suppress warning on FW_OPT_NO_WARN flag
Some of the warnings are still being printed even if FW_OPT_NO_WARN is passed for some of the function e.g., firmware_request_nowarn(). Fix it by adding a check for FW_OPT_NO_WARN before printing the warning. Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Link: https://lore.kernel.org/r/20240219163954.7719-1-quic_mojha@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a54c1d1b85
commit
1fe6e4f0b0
|
|
@ -551,12 +551,16 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv,
|
||||||
file_size_ptr,
|
file_size_ptr,
|
||||||
READING_FIRMWARE);
|
READING_FIRMWARE);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
if (!(fw_priv->opt_flags & FW_OPT_NO_WARN)) {
|
||||||
if (rc != -ENOENT)
|
if (rc != -ENOENT)
|
||||||
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
|
else
|
||||||
dev_dbg(device, "loading %s failed for no such file or directory.\n",
|
dev_dbg(device,
|
||||||
|
"loading %s failed for no such file or directory.\n",
|
||||||
path);
|
path);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
size = rc;
|
size = rc;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue