Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1003908pxb; Wed, 1 Sep 2021 15:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2a9puZVBeMjEW7CTv35QL+Mb3lYUe7aoRXkwHuAAolO2xchCJLqGmLF+5OBvVOehfjtOf X-Received: by 2002:a92:c94e:: with SMTP id i14mr1160258ilq.143.1630533800694; Wed, 01 Sep 2021 15:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630533800; cv=none; d=google.com; s=arc-20160816; b=qMB9fvPO4/pYTifV1h3hvBLARls5E1PRp9vWukE05qChKDxIHTh1FTgVGYXW2E8kc0 6ANQzSkZADKQB+KkQqLOy8fxDLOXJ0STJF41fvw7DH5x9Ko3YcasLmG05VZHrOkBHHFE AYSo017d+08pQJLkYRc6tOAV5x7hTWwSBmFK4jNxhBWZjYmNXZu/a6w8slVsY3sOXhOH bIStz+QObbKzfAV9nA95sCFpDM105o/aoC5ZH4NVJMTWW4Bg+sTI3GZdqkAQEMyslQlp 2D67fY5/0MMKy+6kQhTMJakEzVUBAT6i1n3qdqcQmNnV28dAaSBNNdI9ds8zevJ3fwVU 0O4g== 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=RyMbj4vWacAwZFU7H6kimQ+3EqGnyAWkwtexMunQsGs=; b=NeK4Ifv3oSqh1sYPyLk4+HJUNLVvC7hQDS7iJGMJuj5hXVvs/oLh7kqB5i0lJboOhU 5hNMYYtjX9jgvdq0yAIRhvq0DtbIPM+pjWg7WTMzjUXRz68InyVF9XcH6f8r9i24zo36 SlIGLL2zulMweV6VsHN+BB/c+CtpgHQ+I9l9vy/GU9D+1TG0NBY83kQ1/NnLAO5nrveQ BJ9SamxJ0KlUgdP0fU8swD0xcm7HzExQ0tnP4zrRnc3aEaEj4Ja6IvT/0sbAxlIzeOkZ QmnS0cyCxqpP+uTmAXbc7RV9xOqgbYJGjSmO072pc9tDKZr/h2opVki5OIcormbJRV/n Qk7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EBb4oOYi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si13311ilg.98.2021.09.01.15.03.09; Wed, 01 Sep 2021 15:03:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EBb4oOYi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S244147AbhIAMmg (ORCPT + 99 others); Wed, 1 Sep 2021 08:42:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:42458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344442AbhIAMja (ORCPT ); Wed, 1 Sep 2021 08:39:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 046B0610F9; Wed, 1 Sep 2021 12:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499707; bh=DMseKcXPlJ0eQwvrZsYnP0lIdsti2YeWRPnMmmG9wno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EBb4oOYiI4pfQlih83qIvSc5CHWQe+pOSPIeIwL5z3vfI2KJ00KJXZEtJa2NCX2BX b0oP9ywJREgYlhii90q2Lsez9ZaS8GOv0gZmvnGqnBqbkgHVjfPCSs5fpHuhtY/Rnw teKpoaymQZy4dYe8Dtbt4Lirm2IzJAwQThHF+SIw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adam Ford , Geert Uytterhoeven , Stephen Boyd , Sasha Levin Subject: [PATCH 5.10 053/103] clk: renesas: rcar-usb2-clock-sel: Fix kernel NULL pointer dereference Date: Wed, 1 Sep 2021 14:28:03 +0200 Message-Id: <20210901122302.353455604@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122300.503008474@linuxfoundation.org> References: <20210901122300.503008474@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: X-Mailing-List: linux-kernel@vger.kernel.org From: Adam Ford [ Upstream commit 1669a941f7c4844ae808cf441db51dde9e94db07 ] The probe was manually passing NULL instead of dev to devm_clk_hw_register. This caused a Unable to handle kernel NULL pointer dereference error. Fix this by passing 'dev'. Signed-off-by: Adam Ford Fixes: a20a40a8bbc2 ("clk: renesas: rcar-usb2-clock-sel: Fix error handling in .probe()") Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/renesas/rcar-usb2-clock-sel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/renesas/rcar-usb2-clock-sel.c b/drivers/clk/renesas/rcar-usb2-clock-sel.c index 0ccc6e709a38..7a64dcb7209e 100644 --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c @@ -190,7 +190,7 @@ static int rcar_usb2_clock_sel_probe(struct platform_device *pdev) init.num_parents = 0; priv->hw.init = &init; - ret = devm_clk_hw_register(NULL, &priv->hw); + ret = devm_clk_hw_register(dev, &priv->hw); if (ret) goto pm_put; -- 2.30.2