Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp680124pxb; Tue, 5 Apr 2022 18:30:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL3tn1QQypOtc4xO8sZrYdzdececxWB0NrCKTctzXy/IkByW+OqjRRwNpOXgz1cIEuQbfm X-Received: by 2002:a17:902:7887:b0:156:788a:56d1 with SMTP id q7-20020a170902788700b00156788a56d1mr6272632pll.110.1649208609966; Tue, 05 Apr 2022 18:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208609; cv=none; d=google.com; s=arc-20160816; b=RshlTsHEw9YIC/Pu//+QmtLUG8Q+dAzjlKx0eUkB1EUekR5ePmORw8AOC+GfHTY9xx wM9FshPq1STxd1OcK4sdT1V9Yr4et8dXaVVqSCkQ5HiX+0TA3ARJFsklN1jXJSSMCIoo CtO3iHDDez+frqD+8W8oFo6AhDl8ivRLxTSBDqRxhJh4q03Q404ODgsDJGb31ntvSG4N EPDT29CCkTS0h053E3nqJ5wpHvjmyl6Wg9IzeS/UvWXdZB9Tpr93vq3UM0wHnQrKwj+T 2FUOnmCOrq9Pq9fH5mQ6Aq7T5V7dChyncfvLY97avbafEKA+H/Hg0gOXk/hA+jEl7g9m ATMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bYPaUMzyQyf58xP6ADHLZYJOqsBl7JPldCG8P3V2+3g=; b=zoVxd26tmvN1Pswg48RGn1u/mu9+9s/LjmppfJBX+7UQzbcqEA0cVCuo9JY9OGsyhN AFc0AhW2DzFOn5+qOmdtWhen4xca4bpv/MRN/jFvIFwTL1Qf/1YZ/tj+tCKdFas5U+H+ 9WsXoQUA50ShyI8Xxzj9xOaEpaYNra+3fBgqOyPEA3jgoWg9+fX44Lj38cAfDqDDFJPh L2ZXYsYVHROste1r0h45r7Z/ePE9o6bptoInLtjlPIkOCKJDrLKx/2jQL+auFchZSqep ygPTQmOwZJ3+ys5MJifFlUoEhbwDzoX/uR7yADALAIwl9x9AhH6ZAx7C/m6BiG7t7MFs cdRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=09RTSb1b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a6556c9000000b00398eb2e9574si11535864pgs.298.2022.04.05.18.29.54; Tue, 05 Apr 2022 18:30:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=09RTSb1b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352729AbiDENHG (ORCPT + 99 others); Tue, 5 Apr 2022 09:07:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344010AbiDEJQr (ORCPT ); Tue, 5 Apr 2022 05:16:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA3D2C29; Tue, 5 Apr 2022 02:03:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 85BD2B80DA1; Tue, 5 Apr 2022 09:03:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C009BC385A0; Tue, 5 Apr 2022 09:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149412; bh=gf6hFb0IBIczvzNtHPPSa+xIRoepqNHHLtYzglD/wDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=09RTSb1b8qAt4jdivnLdhDpZ/Hn3NQXEjTCoCCAlCYv+vKp9OIlgAGeIcXsLxTl7i /evOK54tRIw/F4t38jLyP5LBC8wUUFqjUVkBBHgplPdjvZUBTtvQuLwjQmtQWFlmTp rHdoKA0Ta4wrBRq721uayYxc3r1cClWhmgpMITII= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jingoo Han , Jiri Slaby , Michael Ellerman , Julian Wiedmann , Vasily Gorbik , linuxppc-dev@lists.ozlabs.org, Igor Zhbanov , Randy Dunlap , Sasha Levin Subject: [PATCH 5.16 0704/1017] tty: hvc: fix return value of __setup handler Date: Tue, 5 Apr 2022 09:26:57 +0200 Message-Id: <20220405070415.167064419@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit 53819a0d97aace1425bb042829e3446952a9e8a9 ] __setup() handlers should return 1 to indicate that the boot option has been handled or 0 to indicate that it was not handled. Add a pr_warn() message if the option value is invalid and then always return 1. Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Fixes: 86b40567b917 ("tty: replace strict_strtoul() with kstrtoul()") Cc: Jingoo Han Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Michael Ellerman Cc: Julian Wiedmann Cc: Vasily Gorbik Cc: linuxppc-dev@lists.ozlabs.org Reported-by: Igor Zhbanov Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20220308024228.20477-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/hvc/hvc_iucv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c index 82a76cac94de..32366caca662 100644 --- a/drivers/tty/hvc/hvc_iucv.c +++ b/drivers/tty/hvc/hvc_iucv.c @@ -1417,7 +1417,9 @@ static int __init hvc_iucv_init(void) */ static int __init hvc_iucv_config(char *val) { - return kstrtoul(val, 10, &hvc_iucv_devices); + if (kstrtoul(val, 10, &hvc_iucv_devices)) + pr_warn("hvc_iucv= invalid parameter value '%s'\n", val); + return 1; } -- 2.34.1