Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp745987pxb; Tue, 5 Apr 2022 21:29:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxw0y2YWwCCfO8ckNZFIzHfjdT8eqz+c3EelEDMRlENEiln91MrPBf/9LKEwo8uUfhlf+Lj X-Received: by 2002:a63:5907:0:b0:382:2f93:5467 with SMTP id n7-20020a635907000000b003822f935467mr5523614pgb.460.1649219388479; Tue, 05 Apr 2022 21:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649219388; cv=none; d=google.com; s=arc-20160816; b=AsATEw1PjLMA2L5d1dhDlncEOaBC2Kj+HjZsZ9nIfMSf/2BjDp+BeyL0qTje5D6RVb saS0vVvoVSXvVPX3aOW3g7cTjfUNRvPs3qKdfhsrjkyYXKJ51KV69ApsbAS77xHHn1s6 jOdb6jwEY3aAdNWX+xVCU5jC5cwZqaQhDSv8234OmhSoTAKHglIO7m3sxgs9oxEdp6Rl QDHe4fm1gpSJpY74VZSDgS8hQ60WCKy/rekMO41G63Xc6YsVmkocbWPLgIo+6xmGzV31 yuJNLAu3j8bi+OKsi8Gw30KOy6XOJkwu3FKI8XrGCgY5scZq/itMuq5pF1g/Ai5YVuUF zMeQ== 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=1R3A3tzniWJENsvn2WRR6D6kw6n28TuJJ8olqdemZ8k=; b=opF5NaPfXpwXu19jrxWc0dFKH2o1BPnZxbcCtTPkVa8NsYaQYFm5wxQISLVBMMf9ZD KMzMUqNxylz4ltGiAz2B680yZIEZgzHzS3+qNXw8icxN4Eg+IEkHsh4ov7MtuFFPeoRQ msiF2quyzscN1bBQ+k7VrtJkHAaXcu9Ngt15aUUGPTbZkpvdzjYgkD40LL1z1KKKDuqG gSnSgxV7Disf220GaW1i2xX+oCt7HzQx/P/kR6bV4mdJEUv31Omjy48FuamJN9O11Lt1 VItuc1k1WrfF1iqzFrdvsGQJKiFr0QMqa2aPE13o0irPrzoAbfiFGvO2XBxzCjqwS7L8 xQbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oVuzoDeL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r27-20020a63205b000000b0038609ba1522si15065873pgm.122.2022.04.05.21.29.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 21:29:48 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oVuzoDeL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9F306C31EC; Tue, 5 Apr 2022 19:52:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237129AbiDEIlm (ORCPT + 99 others); Tue, 5 Apr 2022 04:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236136AbiDEIBb (ORCPT ); Tue, 5 Apr 2022 04:01:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80B5849FB3; Tue, 5 Apr 2022 00:59:33 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 1E5ED61668; Tue, 5 Apr 2022 07:59:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3412BC340EE; Tue, 5 Apr 2022 07:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145572; bh=F2QB7kb0dawbt9xWarnKA2zPFQV/q0hPhE2v5d7TAd4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVuzoDeLa9X9EtThxGP6ZOv8lIO8sDtKF4d/BAkF+Jo+XRyGXxeDFyPX6ilcDqHCi tLIVP3FLWfPt/woR6+blX12iKJMXDFkJax3CcBwvfUrrc/m6/EurADv2X3UnvL0k+u gE/EiQgJpQOP3tPbiXVT14GVDtbxOz+JwlXHjagY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Robert Foss , Sasha Levin Subject: [PATCH 5.17 0425/1126] drm/bridge: Fix free wrong object in sii8620_init_rcp_input_dev Date: Tue, 5 Apr 2022 09:19:32 +0200 Message-Id: <20220405070420.100328320@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Miaoqian Lin [ Upstream commit 7c442e76c06cb1bef16a6c523487438175584eea ] rc_dev is allocated by rc_allocate_device(), and doesn't assigned to ctx->rc_dev before calling rc_free_device(ctx->rc_dev). So it should call rc_free_device(rc_dev); Fixes: e25f1f7c94e1 ("drm/bridge/sii8620: add remote control support") Signed-off-by: Miaoqian Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20211227092522.21755-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/sil-sii8620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c index 843265d7f1b1..ec7745c31da0 100644 --- a/drivers/gpu/drm/bridge/sil-sii8620.c +++ b/drivers/gpu/drm/bridge/sil-sii8620.c @@ -2120,7 +2120,7 @@ static void sii8620_init_rcp_input_dev(struct sii8620 *ctx) if (ret) { dev_err(ctx->dev, "Failed to register RC device\n"); ctx->error = ret; - rc_free_device(ctx->rc_dev); + rc_free_device(rc_dev); return; } ctx->rc_dev = rc_dev; -- 2.34.1