Skip to content

Commit 30b4b1b

Browse files
XenuIsWatchingkartben
authored andcommitted
drivers: i3c: shell: fix getcaps fmt2 defbyte check
Fix the checking on the getcaps for format 2. Signed-off-by: Ryan McClelland <[email protected]>
1 parent 0837ad5 commit 30b4b1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i3c/i3c_shell.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,8 @@ static int cmd_i3c_ccc_getcaps(const struct shell *sh, size_t argc, char **argv)
14761476
if (argc > 3) {
14771477
fmt = GETCAPS_FORMAT_2;
14781478
defbyte = strtol(argv[3], NULL, 16);
1479-
if (defbyte != GETCAPS_FORMAT_2_TGTCAPS || defbyte != GETCAPS_FORMAT_2_TESTPAT ||
1480-
defbyte != GETCAPS_FORMAT_2_CRCAPS || defbyte != GETCAPS_FORMAT_2_VTCAPS ||
1479+
if (defbyte != GETCAPS_FORMAT_2_TGTCAPS && defbyte != GETCAPS_FORMAT_2_TESTPAT &&
1480+
defbyte != GETCAPS_FORMAT_2_CRCAPS && defbyte != GETCAPS_FORMAT_2_VTCAPS &&
14811481
defbyte != GETCAPS_FORMAT_2_DBGCAPS) {
14821482
shell_error(sh, "Invalid defining byte.");
14831483
return -EINVAL;

0 commit comments

Comments
 (0)