Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020383rwb; Mon, 15 Aug 2022 16:17:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR6HB0XgQsk9GP9zl8W8BjmLrOx8+orRfp3N4Yb8cnDG0wUaX8lJgrc89rwfpv+zuqa8T559 X-Received: by 2002:a17:907:e88:b0:730:8e7d:2281 with SMTP id ho8-20020a1709070e8800b007308e7d2281mr12670330ejc.20.1660605449227; Mon, 15 Aug 2022 16:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605449; cv=none; d=google.com; s=arc-20160816; b=FDfCGiiUh4huc5UF1vnSHml+fXCoznbwvIJZtI13hWhz+MHI47odN8WnvGx1g9tqed bl6px+LqZoNxfi+QsjmscoQka1sD5VoIOUdhGcVt9DAWXQrdAm+bZXzpJ0BK67DYZ47g UTm70GnIPobhYJHSpr8bZ6LFU2ADNWYn5qPsppJkffm0BhKuxCaUC0PGrnTRqCdDDMdu qOJxSDQQRox4dKvGawMElxoU6QhBrwRNzhxMVa4Uv5+pO/C+s5oaKrwKEVDSL59ekhK0 Qu1nrcyXkjmwLJGhFp/fQB0yrR7tG+QEyBRxczGvssAQRYRfvToJsFfPN6TSbo07lcZa pZSQ== 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=0zIfQmeGzRebblWaB+fHiJNdPGcNwO0cn/oL0hW2QmQ=; b=UO/abRxYZObnDfJT95RCLAr2DmXUZIDs48PjtpIC3iq2ykW1t+XHATQQua0gTKBsOd KRP4MLSWZizB9TQ8RFwDXoiyi2bhmr+bkyGdLb4ZPe9pGykbw5xsyNUwhp37TuK2Pg6E AzO4l5ypMdWUkMZ9ukHCZCIJSSE/O+mCkIkkpyJb+o/rFP0IOcbNGVSaCosRFr2YoOFN jcBTtlCGyf5eSfH9DxjosD/OxUTR4L1Be1DarFFLqq0H5ZncfJagYa5RN/6sB0A4njlg fFm6PRelyEQvnJ+YwF/5Yzbq1SNxfVtXiETKIY8N+RrB6hQZ0wJfDOnBZ6oWXx7YBzaB GadA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aWYApASO; 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 u25-20020a05640207d900b0043dc410c5ddsi8237609edy.484.2022.08.15.16.17.03; Mon, 15 Aug 2022 16:17:29 -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=aWYApASO; 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 S242388AbiHOUHh (ORCPT + 99 others); Mon, 15 Aug 2022 16:07:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346058AbiHOUGA (ORCPT ); Mon, 15 Aug 2022 16:06:00 -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 9843481B02; Mon, 15 Aug 2022 11:55:02 -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 45FC8B8105C; Mon, 15 Aug 2022 18:55:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0CA0C433D7; Mon, 15 Aug 2022 18:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589699; bh=4WBlhzPsjfVj1rRFmuAP5awjPtNhQi4gcsTz5aOQEgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aWYApASO/dsnHAGhXRDvtJqaIwS5Lt5xu7YLNjsRz/eL2uk3Yt2gnBYNQ9lDmwjNk zprJ43RM9OPS6vTor4MTGrDNJpRSE8Yrx0i/IiCA3teCve+BP+gOfKi+ST8vI7ZmTp HcsmEu6eufxyFDSb3bU5Gm28lqbg95/JCjClx8fs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Daniel J. Ogorchock" , Guenter Roeck , Dmitry Torokhov , Jiri Kosina Subject: [PATCH 5.18 0020/1095] HID: nintendo: Add missing array termination Date: Mon, 15 Aug 2022 19:50:19 +0200 Message-Id: <20220815180430.187702863@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 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: Guenter Roeck commit ab5f3404b7762b88403fbddbdda6b1b464bd6cbc upstream. joycon_dpad_inputs_jc[] is unterminated. This may result in odd warnings such as input: input_set_capability: invalid code 3077588140 for type 1 or in kernel crashes in nintendo_hid_probe(). Terminate the array to fix the problem. Fixes: 2af16c1f846bd ("HID: nintendo: add nintendo switch controller driver") Cc: Daniel J. Ogorchock Signed-off-by: Guenter Roeck Reviewed-by: Dmitry Torokhov Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-nintendo.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -1586,6 +1586,7 @@ static const unsigned int joycon_button_ /* We report joy-con d-pad inputs as buttons and pro controller as a hat. */ static const unsigned int joycon_dpad_inputs_jc[] = { BTN_DPAD_UP, BTN_DPAD_DOWN, BTN_DPAD_LEFT, BTN_DPAD_RIGHT, + 0 /* 0 signals end of array */ }; static int joycon_input_create(struct joycon_ctlr *ctlr)