diff options
| author | Tom Rini <[email protected]> | 2023-08-08 21:38:05 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-08-08 21:38:05 -0400 |
| commit | 1e1437d9f8b5be362afdd0212dbae6c41f53f3d8 (patch) | |
| tree | 7c22536424032112c0c5e3ddce45f0333478f355 /cmd | |
| parent | a169438411f9277cc689c14078151aa1d1caae3c (diff) | |
| parent | 70fdcc704a978acb4de5e891469825596c0d292e (diff) | |
Merge branch '2023-08-08-assorted-code-corrections' into next
- A number of code corrections caught by Smatch and a few others as
well.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/mux.c | 2 | ||||
| -rw-r--r-- | cmd/nvedit_efi.c | 2 | ||||
| -rw-r--r-- | cmd/tpm_test.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cmd/mux.c b/cmd/mux.c index 833266f08b1..c75907af772 100644 --- a/cmd/mux.c +++ b/cmd/mux.c @@ -49,7 +49,7 @@ static struct mux_control *cmd_mux_find(char *const argv[]) chip = dev_get_uclass_priv(dev); if (!chip) - return ERR_PTR(ret); + return ERR_PTR(-EINVAL); if (id >= chip->controllers) return ERR_PTR(-EINVAL); diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index 24944ab81e2..7a30b5cc8f8 100644 --- a/cmd/nvedit_efi.c +++ b/cmd/nvedit_efi.c @@ -262,7 +262,7 @@ static int append_value(char **bufp, size_t *sizep, char *data) char *tmp_buf = NULL, *new_buf = NULL, *value; unsigned long len = 0; - if (!strncmp(data, "=0x", 2)) { /* hexadecimal number */ + if (!strncmp(data, "=0x", 3)) { /* hexadecimal number */ union { u8 u8; u16 u16; diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c index c4ed8e59012..9bdc9c660fd 100644 --- a/cmd/tpm_test.c +++ b/cmd/tpm_test.c @@ -294,8 +294,8 @@ static int test_readonly(struct udevice *dev) */ index_0 += 1; if (tpm_nv_write_value(dev, INDEX0, (uint8_t *)&index_0, - sizeof(index_0) != - TPM_SUCCESS)) { + sizeof(index_0)) != + TPM_SUCCESS) { pr_err("\tcould not write index 0\n"); } tpm_nv_write_value_lock(dev, INDEX0); |
