edac: shell: Do not show error on ENODATA
In a case with ENODATA do not show error. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
d0d87a213b
commit
8390ae5d70
1 changed files with 4 additions and 4 deletions
|
@ -62,7 +62,7 @@ static int ecc_error_show(const struct shell *sh, const struct device *dev)
|
|||
int err;
|
||||
|
||||
err = edac_ecc_error_log_get(dev, &error);
|
||||
if (err != 0) {
|
||||
if (err != 0 && err != -ENODATA) {
|
||||
shell_error(sh, "Error getting error log (err %d)", err);
|
||||
return err;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ static int ecc_error_show(const struct shell *sh, const struct device *dev)
|
|||
decode_ecc_error(sh, error);
|
||||
}
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int parity_error_show(const struct shell *sh, const struct device *dev)
|
||||
|
@ -82,14 +82,14 @@ static int parity_error_show(const struct shell *sh, const struct device *dev)
|
|||
int err;
|
||||
|
||||
err = edac_parity_error_log_get(dev, &error);
|
||||
if (err != 0) {
|
||||
if (err != 0 && err != -ENODATA) {
|
||||
shell_error(sh, "Error getting parity error log (err %d)", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
shell_fprintf(sh, SHELL_NORMAL, "Parity Error: 0x%llx\n", error);
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cmd_edac_info(const struct shell *shell, size_t argc, char **argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue