Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp498534pxx; Wed, 28 Oct 2020 09:41:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0LO3NCMtYeTzontrnVoShI2cKyRub1cNIatTxncS+Ew3i7GA0TxmXyj/llZJHfXjcIR4w X-Received: by 2002:a17:907:42d2:: with SMTP id ng2mr8269944ejb.124.1603903279652; Wed, 28 Oct 2020 09:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603903279; cv=none; d=google.com; s=arc-20160816; b=GB7iqm5qrYx3dvKTXijJ7M6T2wSS1Qr/e4WcpjwmCP4nZnZnbSHe3tBoIO+LWZsCZv fkVwlZfIuF5ZoewRLTJl5DxJ8wiB8hE60mSHrK76YYtYAqLiSwVhW9wQ8Swpskz7eiHi qJV0ap36RUad9OHRCz5I+rOWRSdY4Uq2RgeK5SVnvZVPTdPe6JHxe8xO9pg6CQ7A21Hc cPxj9s40es6WIxNlb6fYvUv4Eu4Lk8ISQl+J5pQGQIDQTZ0pruKULmjSGm1XPF2zrslD YFcfJ8QKzeHpgILNg1z/GnVJsGD7nB7XgSwGr/sv1HQIs+R89ouDcXplar5lYfHUVNfF k1tQ== 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=7R+f0YWSjNaTzW5w/f00FbIwjiswrqwLeMB6iopDqko=; b=u+dQCAw8HXyHsynjfYnmPqe1/hlPj0/vXdSe3Uo2qcJgYBcPgtRvquYIS2Yi8+uajl JkgsXGq0zs0z16r/UseEDC2hve5TW5CQujUaCC+tv4W0ZJ4UVMR79a3MhyS3rU2TApCd Y9OFe2fouV7afd+pc9fmzEtDpTIvaLGRAFs5jCofmt2iZ86PYS7K92XD7qJpBm6qWbKy DSuCmHLS/Uqkk1zR9maumkpw0xo/ESFrVRpXk7fjYZxKOjRCk/TfIo+hv3cYoCFlV15m lynSq97bszDNwvLUU9mnYlN8CrK33pYSMO2/O5J/SyHCzwYdwHrVvsRKwxUNdtxHKsoi dhgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OsTv0V9C; 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=fail (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 d23si26051edr.183.2020.10.28.09.40.56; Wed, 28 Oct 2020 09:41:19 -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=@kernel.org header.s=default header.b=OsTv0V9C; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1818177AbgJ0RR4 (ORCPT + 99 others); Tue, 27 Oct 2020 13:17:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:57766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1782271AbgJ0O46 (ORCPT ); Tue, 27 Oct 2020 10:56:58 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E955A2071A; Tue, 27 Oct 2020 14:56:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810618; bh=iJnZVUHkBWMdIiC15dVvfmSEi1FVvefmqQkpr+lsdU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OsTv0V9Cw+1EpZj9urItxopFF2rDhWiElhP6FycOnz2De9V+QVk+NrmqcW5tHS/H/ pb99kr7vfFO9+AYw+bGQyTYG8AlQR3/QgHvA/F6tkMYer3XHSxN5gJCOZV6cv2KlOt uixDf++k6H/CDIGgjnG+ojPQGwc7Btqhmahj9L88= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , Mathieu Malaterre , Kangjie Lu , Benjamin Herrenschmidt , Bartlomiej Zolnierkiewicz , Sasha Levin Subject: [PATCH 5.8 203/633] video: fbdev: radeon: Fix memleak in radeonfb_pci_register Date: Tue, 27 Oct 2020 14:49:06 +0100 Message-Id: <20201027135532.209258644@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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: Dinghao Liu [ Upstream commit fe6c6a4af2be8c15bac77f7ea160f947c04840d1 ] When radeon_kick_out_firmware_fb() fails, info should be freed just like the subsequent error paths. Fixes: 069ee21a82344 ("fbdev: Fix loading of module radeonfb on PowerMac") Signed-off-by: Dinghao Liu Reviewed-by: Mathieu Malaterre Cc: Kangjie Lu Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200825062900.11210-1-dinghao.liu@zju.edu.cn Signed-off-by: Sasha Levin --- drivers/video/fbdev/aty/radeon_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index e116a3f9ad566..687bd2c0d5040 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -2311,7 +2311,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev, ret = radeon_kick_out_firmware_fb(pdev); if (ret) - return ret; + goto err_release_fb; /* request the mem regions */ ret = pci_request_region(pdev, 0, "radeonfb framebuffer"); -- 2.25.1