From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f45.google.com (mail-yx1-f45.google.com [74.125.224.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3B3143DA53 for ; Fri, 27 Feb 2026 20:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772225707; cv=none; b=R2sZgOgWDLHFDQDf2khLg2NI6oSx3fBIfJQ8heOtf3HZ4kEXWglGcsAcdEPbirPkp16KvcvAGUHIvWXyiOgynO5vYewdO2Y1noBJ4tJUPpFCcLBTwgdRwC6RVfTfloBkeM2b8DoZdycnb0LwR1mQNxbrOjFDwWJGJAo7155a/T4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772225707; c=relaxed/simple; bh=2L9AH1fbv3hD2pN30kfeymBpxCP0X38ypHeoTWHMfQY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XbUlnOPWwZJGKLt1ZbQWbspsZ9NsZMcDnN+fLlYR5wda0e6BHo7i7oSceEtEnj6kCRq1OkVDUqZvds/7aZz3P9jtjbmrRl84Zt2ic3h8jyu75N7YxWBjFXVws+JdU5qx0+VRlZaKADAKbWR9hRAqxQ6+TKQENYcZRDrAH8YU30w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=e/QrJ1u2; arc=none smtp.client-ip=74.125.224.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="e/QrJ1u2" Received: by mail-yx1-f45.google.com with SMTP id 956f58d0204a3-64c9a6d68e5so1891647d50.3 for ; Fri, 27 Feb 2026 12:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772225705; x=1772830505; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qpJvwZ8KcD1PIhsz01U1baureuVfvggAoVTmPDUtPPA=; b=e/QrJ1u2W/MhQJjfmEUsG6iz1LOsT9moSI/H9mmLsyVM8NM6aHYJbJx3N9uBA2CWBl 4VgJTzw9DkK6hh0VJBOFxCl+dT6SfFxAFzCOkh9zNbSCUcey7yaJDxQwssqok6lj9Zt7 AAslvvJcrFdeUyxPjhejE5/hU2Td7Aq7A3SWBOqGnLbcC0BSRJkn9cuus5HuF9qHRY6P UKb8RjrhqI4etZLVMpm6zfbScslSdTzmzP1tw1LMLEcfNj+Cvv5mSRkF+kpSUls00CY9 f8dEhEb/5+ign4WoesE1NyR4bZOAliTTCNQ5PlSD7jeK3+Eaolm92A5A/RCyWBpnlIG3 0EmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772225705; x=1772830505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qpJvwZ8KcD1PIhsz01U1baureuVfvggAoVTmPDUtPPA=; b=xAVACn93VGRN9zY1zXLdD1TMGVoC9FkFk513rN6lAyAz0AUtLy6drB7ZHsIi/8+Fd+ hExQtf92vR++MZhfQcpwPrly1XRM0+XnVyOetRCQJGCmglTBW2A6oF6fIPMUMRCI4PYw iQsteGpZaCus2n/1IVOZvYaFQXsVC/6gMsFm8rGrQDuF7KDSlgOAVQB48HTe9qSzscY5 Nh6psPG2yElh9WaOnQnFXF1Pl3gJL6UpxSdLyI4O+j4wy1Vps9pnXyXhA5iZqnsVA2uw NgsicVnhk8S8spWJnSRh4v9l/fSp/P+KvKOaRT2nfdIyUjR/ENOBNzRMOu/wOgNI3j6c XToA== X-Forwarded-Encrypted: i=1; AJvYcCWQrSpKnn0BO6OadzeRteV/NRaljI2P82InzoInJW3Co9zmM8rbRf6wlMLvfe1xw8+hUJfGoa0k8PJqjAo=@vger.kernel.org X-Gm-Message-State: AOJu0YytUEl91km8k35sKTbUviCWLqljwtbClzlhxWzFcZB3f/uPNmn8 bm0qyg9bjjHOwy9zc2izdlfORhDgGCdEvYBcPUtO++6Ln4zJvRiEfllU X-Gm-Gg: ATEYQzzy4qtT1AaUfoJ2JUMI3V39Tm2P9m7ojHr3nR/h/E2dXEp+KjyXpGx8LY3gSaW fSL0wtipDXOpSIYuBhVP0WWYOQ0aY3f3s7Wd5zhpa3dHmq5TR8fufff9SHE8lS24Zzli98i2hdk tfAiinHEwLutSBaaCfk9COHcPQZfFi85FXZj/6JvJpyR3R7n31sLLjjM1LQ9cOjmm87yn6gm9Cz pN24Co/L5aXo/RFYE+oZBlOkDJ5mOppGpDFusUiyvzFDhrapR3ok3HZHu4zhju6LJ/G0dCl6kWZ 0YVtsaXd3FYGPha6t2EVoH/krfO3yc+oxAaKJ4slVFrEeN/WvWEjwJT7hR5cF2laITaiEGueq/l 77xjTDsEE1Qq2+333b5BOkpICwRvNL6xbytESPrx+zpFL0fMwp8qiHsmfM6WDwy51r1ASZWcRIb AiDkaz/7WjvQhUF/Y7ug4uwwfmpvdknsovtAjbZmsqYLVX3KNYz22r5DtavAQGIZIo/1o+Zetyg zD13LP+77aOQOOQM3QTfdHE X-Received: by 2002:a05:690e:150d:b0:64a:ec39:dd64 with SMTP id 956f58d0204a3-64cc22dda60mr3473637d50.43.1772225704974; Fri, 27 Feb 2026 12:55:04 -0800 (PST) Received: from tux ([2601:7c0:c37c:4c00::5c0b]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-64cb7571e00sm2805811d50.3.2026.02.27.12.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 12:55:04 -0800 (PST) From: Ethan Tidmore To: "Derek J . Clark" , Mark Pearson , Jiri Kosina Cc: Benjamin Tissoires , Mario Limonciello , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Ethan Tidmore Subject: [PATCH 1/3] HID: hid-lenovo-go-s: Fix signedness bug Date: Fri, 27 Feb 2026 14:54:42 -0600 Message-ID: <20260227205444.1083103-2-ethantidmore06@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227205444.1083103-1-ethantidmore06@gmail.com> References: <20260227205444.1083103-1-ethantidmore06@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The function get_endpoint_address() returns type u8 but in its error path returns -ENODEV. Also, every variable that is assigned from this function is type int. Change return type to int from u8. Detected by Smatch: drivers/hid/hid-lenovo-go-s.c:391 get_endpoint_address() warn: signedness bug returning '(-19)' Fixes: 4325fdab5dbbf ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver") Signed-off-by: Ethan Tidmore --- drivers/hid/hid-lenovo-go-s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-lenovo-go-s.c b/drivers/hid/hid-lenovo-go-s.c index cacc5bd5ed2b..0ef98ba68d86 100644 --- a/drivers/hid/hid-lenovo-go-s.c +++ b/drivers/hid/hid-lenovo-go-s.c @@ -377,7 +377,7 @@ static int hid_gos_set_event_return(struct command_report *cmd_rep) return 0; } -static u8 get_endpoint_address(struct hid_device *hdev) +static int get_endpoint_address(struct hid_device *hdev) { struct usb_interface *intf = to_usb_interface(hdev->dev.parent); struct usb_host_endpoint *ep; -- 2.53.0