kstrtouint() is defined with __must_check and we will enforce this in a
follow-up commit. The rksecure command used the function, but didn't check
its return value. Fix this.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 commands/rksecure.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/commands/rksecure.c b/commands/rksecure.c
index d761cac152ce..8f277af761dc 100644
--- a/commands/rksecure.c
+++ b/commands/rksecure.c
@@ -93,7 +93,9 @@ static int do_rksecure(int argc, char *argv[])
                        hash = optarg;
                        break;
                case 'b':
-                       kstrtouint(optarg, 10, &key_size_bits);
+                       ret = kstrtouint(optarg, 10, &key_size_bits);
+                       if (ret)
+                               return ret;
                        break;
                case 'l':
                        lockdown = 1;
-- 
2.47.3


Reply via email to