Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp839807pxb; Wed, 6 Apr 2022 01:27:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw87434YHKh2nY3JkMfyl2EL6dPduEftmVM9/Pk7421x0ZdyehOfRweZ6Tqw0HLFQrnecwA X-Received: by 2002:a65:6cc3:0:b0:382:9d3c:ff82 with SMTP id g3-20020a656cc3000000b003829d3cff82mr6335617pgw.110.1649233660680; Wed, 06 Apr 2022 01:27:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649233660; cv=none; d=google.com; s=arc-20160816; b=huchSAwQvipEGnJ6/3BvlQ1p1ZDKbOkKEf21Je8z0dreRkVwSmwXMOkWtcoyUjRUP6 t+WRsgSAAk8VQWLf8zbt0vNyTTHz2VqmNHaY7M3akf95TeNuU1gaL5YREUaHTxOwGosV RmMecxWpIrjyaF4DE8ANfLtEauS3I1d88t2eiV1b7s3vJjWA35A/0R0In4lIb006+E17 DnXARdzBJmbulnQLCHDB0AzkkeTY2y3urVUrVaK9NoUVRZQbO4fF7v+6npaS/1ROweFV KPf1LqYKb39uW+MAowYTOliwYx2gW1O/OQLG1ntPLWv2Hb8RS0lCS1/Y/GpqT/JnL85/ ripw== 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=ju/8AXQygfk6j0vnbbSuE08qHFK9jYd3xJculdBKZ8N7s+FxMS31jbGSo2WCppsNwv PSC0R09agQrAOR41+/8QV9fPcQ7IOh65Qq8PNFYcLxzS4qtc0ZG+VkUtnGgcoOwGAluU irn1zRVbx88eMwHiLjMm6hmF8Sp6+jTZ9buN+7WSvyJgDk5b9mS8K+VrHd7yYTg8L5Lq BACSrX2iJZIQfR8Nc+jPuf6yOA4SAOiGmMYcJXsV89cGfwHjKE8uwaHAL2bMdJ9hwBU+ i5CCflwmOGmiha9YAM/N8atlAslKbcwPPVFfmYegdDaNNe26ohLjRUDbaxWn/f/Kg6tZ NaTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FoWGK7NA; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i21-20020aa78b55000000b004fa3a8e0062si13678468pfd.281.2022.04.06.01.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 01:27:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FoWGK7NA; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C8F72560DC6; Wed, 6 Apr 2022 01:13:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443407AbiDEUHq (ORCPT + 99 others); Tue, 5 Apr 2022 16:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349495AbiDEJt5 (ORCPT ); Tue, 5 Apr 2022 05:49:57 -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 34EEF107; Tue, 5 Apr 2022 02:47:42 -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 D7A90B81B14; Tue, 5 Apr 2022 09:47:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21BAEC385A3; Tue, 5 Apr 2022 09:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152059; bh=gf6hFb0IBIczvzNtHPPSa+xIRoepqNHHLtYzglD/wDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FoWGK7NAv69pGl67nh7AeXfBR6259fw+70yk5OgHd9EWPyuoKey5IxUQrHHg2Bn/D 65Z7zG5odm5nw2UCV5ZXbAZEyJe/mJS/52Mwy8C8y/5hStiC2VUbFLQuTuVqpDkqoD WQ+0TQgyRg3OlVO8iOb+XK/rRjeCv72eF2Edfw3U= 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.15 640/913] tty: hvc: fix return value of __setup handler Date: Tue, 5 Apr 2022 09:28:22 +0200 Message-Id: <20220405070359.024809762@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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