Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp184952iob; Mon, 2 May 2022 16:34:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhsUA7mjk6GkvFGm5TFxvrdQpNZXq29uxbvoXrujuU8oPecVTq5D58h1Ez+5u7HV0SCzjH X-Received: by 2002:a17:902:dac2:b0:15e:90b0:d35b with SMTP id q2-20020a170902dac200b0015e90b0d35bmr11798090plx.169.1651534466514; Mon, 02 May 2022 16:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651534466; cv=none; d=google.com; s=arc-20160816; b=H/reGhxFLtj9pm5nqR4B8id3bYz0uR+1X3z6RePwAtyD3n+460IUOBZd5FrJUax/v3 kRb3GtsNEPjTf5CTvRySplAjnSILjiicBsBeQcPWsYKJdj2sZzS8q7JL/BxuqzQR0OMK N4PI9KRpRKpvUI/wh/AFw5FDWeZPEI6mRBaqfmbrXBN/W1y/jZtYwpzMAVcnj8BeX9yl uhWlPu06OgYvvWix6isuvej2gMFLbpvO/E+zklVOR1iNKwXf07RfVo75kN0o/Fz1aGCU yN5D7N+MjgMtVhRIK8Edot/JbTkSIXlge29J05IBEfwnxlOaHKwDl8cUlg8GP/9pf6jx v3hw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Hkok9GE2rfS+VvKA2iiQrn4WrZ6pKx483FISLOa1dmc=; b=WHljtDLKS66ON1Tu18xs49mWXQ6PkidARzv0O4qW+H0cum67QctT2SLRbqTFK2pTXB w8T/j6VuD4087j4QdngeNd/m3auXHpP4RKErmee8TC76X3qsq9B7HfE6jz9WG6CIw7rm ufXuQALaMcYl75OylECuUfRqMlPHVEsgu4orPmF4ch51Jbj20bPuxseTPJgLTvKnbDYC VUKB0rpDI3rVAKTwCPzlZMXzjI1bR7DopTbXILIrL/vWpWdgwQUcMd0RCFCbVZkdlw84 K2Qnf2Ju5Z0jP420LH1LhXCXfVWyP9sZ/KoJseCsWLNARfylzgEjqQtgR5/DBRlTCb8C LCTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bGR0VMGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s13-20020a63214d000000b003ab45d6e88asi16394908pgm.254.2022.05.02.16.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:34:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bGR0VMGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D9D431DDC; Mon, 2 May 2022 16:34:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384819AbiEBL7z (ORCPT + 99 others); Mon, 2 May 2022 07:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233089AbiEBL7v (ORCPT ); Mon, 2 May 2022 07:59:51 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67C501B796; Mon, 2 May 2022 04:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651492583; x=1683028583; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LU/yq2s1oiKyRxaX8QPYQK3cW92BG0hvyB55dS1zvnY=; b=bGR0VMGNJiB0kh6bqN3kxw3bFix7H9IWfbmn9pY2Q3aaE6cc7WPr7ViT G7bqSLJB9O8CDj5MXPHRlqxKeBnKVGw1ku5HCCgNWOqYtYvN76LxRSXcr OQkO+w+jNyDfjEJuXbOJsC3bpD26+V+/a2OnfLKQMA4kw9G2EYy7kfWYM RRLmK9sYUW08xeUqH7xSWaWG3CzioR0weqs1cAw+jqlQKv6CCc2097Vb9 eNjYw5+dmPTjnCn83q0aFkSLo0Q9s2BOaK2CO41Zl454Gi/xv+zBWm2yC nktYWs+VR0nCfq5fUil8KulDOKlhXwqtEUVnUU9K41MWmPmaPXD9agpCn g==; X-IronPort-AV: E=McAfee;i="6400,9594,10334"; a="247100462" X-IronPort-AV: E=Sophos;i="5.91,190,1647327600"; d="scan'208";a="247100462" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2022 04:56:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,190,1647327600"; d="scan'208";a="707576070" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 May 2022 04:56:20 -0700 From: Heikki Krogerus To: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby Cc: Miquel Raynal , Emil Renner Berthing , Geert Uytterhoeven , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] serial: 8250: dw: Fix NULL pointer dereference Date: Mon, 2 May 2022 14:56:21 +0300 Message-Id: <20220502115621.77985-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 dw8250_platform_data is only used on DT platforms for now. Fixes: 4a218b277fdb ("serial: 8250: dw: Create a generic platform data structure") Signed-off-by: Heikki Krogerus --- Hi, I'm sorry, I have to resend this (to you guys). I left out the mailing lists. Br, --- drivers/tty/serial/8250/8250_dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 0cf1a99dc1244..31422e44c64ff 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -433,9 +433,9 @@ static void dw8250_prepare_rx_dma(struct uart_8250_port *p) static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data) { struct device_node *np = p->dev->of_node; - unsigned int quirks = data->pdata->quirks; if (np) { + unsigned int quirks = data->pdata->quirks; int id; /* get index of serial line, if found in DT aliases */ -- 2.35.1