diff mbox series

mtd-utils: flash_otp_dump make offset optional

Message ID 20220818093548.1932952-1-michael@walle.cc
State Accepted
Delegated to: David Oberhollenzer
Headers show
Series mtd-utils: flash_otp_dump make offset optional | expand

Commit Message

Michael Walle Aug. 18, 2022, 9:35 a.m. UTC
Commit 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to
flash_otp_dump") introduced an offset parameter. This should have
been optional, but there was a typo. Fix it.

Reported-by: Sergei Antonov <saproj@gmail.com>
Fixes: 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump")
Signed-off-by: Michael Walle <michael@walle.cc>
---
 misc-utils/flash_otp_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergei Antonov Aug. 19, 2022, 12:32 p.m. UTC | #1
On Thu, 18 Aug 2022 at 12:36, Michael Walle <michael@walle.cc> wrote:
>
> Commit 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to
> flash_otp_dump") introduced an offset parameter. This should have
> been optional, but there was a typo. Fix it.
>
> Reported-by: Sergei Antonov <saproj@gmail.com>
> Fixes: 0a5e2fa5c1e4 ("mtd-utils: add optional offset parameter to flash_otp_dump")
> Signed-off-by: Michael Walle <michael@walle.cc>

Reviewed-by: Sergei Antonov <saproj@gmail.com>
David Oberhollenzer Sept. 27, 2022, 6:43 a.m. UTC | #2
Applied to mtd-utils.git master.

Thanks,

David
diff mbox series

Patch

diff --git a/misc-utils/flash_otp_dump.c b/misc-utils/flash_otp_dump.c
index f1e1782..324d856 100644
--- a/misc-utils/flash_otp_dump.c
+++ b/misc-utils/flash_otp_dump.c
@@ -20,7 +20,7 @@  int main(int argc,char *argv[])
 	int offset = 0;
 	unsigned char buf[16];
 
-	if (argc <= 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) {
+	if (argc < 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) {
 		fprintf(stderr,"Usage: %s [ -f | -u ] <device> [<offset>]\n", PROGRAM_NAME);
 		return EINVAL;
 	}