Message ID | 20220131105216.275584125@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBDD1C433FE for <stable@archiver.kernel.org>; Mon, 31 Jan 2022 10:58:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348412AbiAaK6r (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 31 Jan 2022 05:58:47 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:46996 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348403AbiAaK6l (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 31 Jan 2022 05:58:41 -0500 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 D3DF3B82A5E; Mon, 31 Jan 2022 10:58:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27C68C340E8; Mon, 31 Jan 2022 10:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643626719; bh=41Bn7dpcwKdRVGJAeUT3KkBCidaikRKvL17gJkZ77QY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIxjDb3c21FkzYEuVqiM45ESjB23w6UEuXWmEXPkk4TwEosjUzIDD/AhFEsH/8wV9 JKXNpGwYLTdcgnbbTeNF7GP/2H1jJFXspbUQVVR9/8bvXUpbDWT326t4vKG6KUKwFh Dydl67cqncuc6+F52bVuQXOCDEduFWXhAbos8zyM= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Jon Hunter <jonathanh@nvidia.com> Subject: [PATCH 5.4 18/64] usb: common: ulpi: Fix crash in ulpi_match() Date: Mon, 31 Jan 2022 11:56:03 +0100 Message-Id: <20220131105216.275584125@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105215.644174521@linuxfoundation.org> References: <20220131105215.644174521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/usb/common/ulpi.c +++ b/drivers/usb/common/ulpi.c @@ -39,8 +39,11 @@ static int ulpi_match(struct device *dev struct ulpi *ulpi = to_ulpi_dev(dev); const struct ulpi_device_id *id; - /* Some ULPI devices don't have a vendor id so rely on OF match */ - if (ulpi->id.vendor == 0) + /* + * Some ULPI devices don't have a vendor id + * or provide an id_table so rely on OF match. + */ + if (ulpi->id.vendor == 0 || !drv->id_table) return of_driver_match_device(dev, driver); for (id = drv->id_table; id->vendor; id++)