From patchwork Wed Aug 18 09:25:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Junghans X-Patchwork-Id: 12443809 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CA8DC4338F for ; Wed, 18 Aug 2021 09:35:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F23C560FBF for ; Wed, 18 Aug 2021 09:35:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233729AbhHRJgK (ORCPT ); Wed, 18 Aug 2021 05:36:10 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.221]:19675 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232769AbhHRJcu (ORCPT ); Wed, 18 Aug 2021 05:32:50 -0400 X-Greylist: delayed 369 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Aug 2021 05:32:50 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1629278756; s=strato-dkim-0002; d=inhub.de; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=KgwfJJW2Vg9oMAPFi5jTrfPc7JwC+CZIStUXfqIF6oQ=; b=liQ15IgV9KKazZ2ljKr6FtHaCX8bB+hwZH4vBaQYpPatJSSWIfPxRjXJcfApXZ9/1v +mmIquwOc1vObov+AG20UKGnH2mYfXjD6HP38wvRM7lWq7HHOSlZEb98oAjCYco4h//b 8sr06+jPIwk8sS5yLv5J5JnKoTDDBh9mdcfYSExT3hbP9absWHTDPXcgZ201UV79Cqi8 dVksl0Ghb3Wy0l8BA7eXK5v0BPJP1UvK7n2jxcgOOZ0GFQdcHyMXXh/JTmajYFvNQVK9 YP9U72NqSYaMv33w9aEXUPRuAR3AU7JDO33eEJJ1QoKsTCWgmKZICnZzFJFGcV1FT8Nm Sw9Q== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":OGMGfEG7NfU1WQAxQKSndOy9b62IXRUXP1G+n0e9SfNgfKKxghMZpWooHBd6LckRo6Cg2ToZyvlfQhM6" X-RZG-CLASS-ID: mo00 Received: from crypto.lan.inhub.de by smtp.strato.de (RZmta 47.31.0 AUTH) with ESMTPSA id k00d02x7I9Puo6T (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 18 Aug 2021 11:25:56 +0200 (CEST) From: Tobias Junghans To: linux-input@vger.kernel.org, Rishi Gupta , Jiri Kosina , Benjamin Tissoires Cc: trivial@kernel.org, Tobias Junghans Subject: [PATCH] HID: add missing dependencies on HIDRAW Date: Wed, 18 Aug 2021 11:25:03 +0200 Message-Id: <20210818092503.16653-1-tobias.junghans@inhub.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org hid-led, hid-u2fzero and hid-mcp2221 unconditionally access the hidraw member of the hid_device structure to obtain the hidraw minor number. Building without HIDRAW causes a NULL pointer dereference in the corresponding probe handlers. Signed-off-by: Tobias Junghans Reviewed-by: Rishi Gupta --- drivers/hid/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 160554903ef9..00416b3091e7 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -522,6 +522,7 @@ config HID_LCPOWER config HID_LED tristate "Simple RGB LED support" depends on HID + depends on HIDRAW depends on LEDS_CLASS help Support for simple RGB LED devices. Currently supported are: @@ -1093,6 +1094,7 @@ config HID_UDRAW_PS3 config HID_U2FZERO tristate "U2F Zero LED and RNG support" depends on USB_HID + depends on HIDRAW depends on LEDS_CLASS depends on HW_RANDOM help @@ -1213,6 +1215,7 @@ config HID_ALPS config HID_MCP2221 tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support" depends on USB_HID && I2C + depends on HIDRAW depends on GPIOLIB help Provides I2C and SMBUS host adapter functionality over USB-HID