Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3631275pxb; Mon, 24 Jan 2022 13:59:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBDCj1D+sVNiED74rZPvj43XBE7FAaxBBowicsZ7bsabZODhkmRThb/stomiCxbbaAM/sx X-Received: by 2002:a63:5753:: with SMTP id h19mr13111672pgm.402.1643061547274; Mon, 24 Jan 2022 13:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061547; cv=none; d=google.com; s=arc-20160816; b=phiBgIBD22yr54QkgRuaMDtZiDj0urI2lSe/Bfw2vpZCbEsSfPYOo2AtpVBB5wiqsd g1dFlOqWZMLVt8y48nPVwPtJRMMRRs/0baQQr1Y1L2shkKyEXoKy1GVdh/+YkaY90WEZ 6gTPe5s+BcU9pVINSI+mhjxVNcsH9QdoAoetPIYuCY9hWJA3ff0w+1yQrTDugdjLFnWQ Emx5I6poMLikOepaf4RpiIumFmw/6ZJWeRyR+KSHroX0so0fTyHHKsGjLRv1H6afb/Ug lYFvwPAo6B73yOT4ezIYunWGr+2LsL8GxIfckMHEfg+xfvVpVPPC9lAEKrYmNzq1OjUS h2hQ== 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=XqKILHTYbJgGPTH0QgSuLj5mjaJyUQ3hww2Kzu+IKy4=; b=xk8Qv7GJ/Ip+p6DIcfPM4hzgi/mJNRriaERaUDcWkvFdrj8p8AjBDJtoI3OB9JVfaq 2jkgLMkYhQcmEBewAJ8ISA7pKtlc6BNos3QRyKRN6J9+lMqOijjdcTV6v8MV6Mle9NLF rp/Mj5T9+CIar9fIwoYx/+l3EF72Q4kg/hzvWw4h7ATESnMrmkX9AxUN8/5LhS6GXfzl H1zcptKNxW0UMQIyorn2ugQgSXJMgqLmV+0xkcEdnSU+1YZUY7n2CK70pPQRrouh6BHb E9iiEBrsrwDoNEsxOSc4/ixVY+TFqh4PG1JtDIOtb046b9TKPP85DZ8bTp1j2Yh/4Wwp 1KVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W2Ij4DJw; 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 h184si6803238pge.170.2022.01.24.13.58.54; Mon, 24 Jan 2022 13:59:07 -0800 (PST) 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=W2Ij4DJw; 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 S1574243AbiAXVsa (ORCPT + 99 others); Mon, 24 Jan 2022 16:48:30 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:36068 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448564AbiAXVNC (ORCPT ); Mon, 24 Jan 2022 16:13:02 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2C4776146B; Mon, 24 Jan 2022 21:13:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8AA0C340E5; Mon, 24 Jan 2022 21:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058781; bh=KRYqqgWjbG1axnu97YGHjeYl7Ss7mR3mkioLhNf+bLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W2Ij4DJw8dExZEtBewcuDbXVPFPKvQN5zsnvr1ydjMfH+dc2HGO9fQZ89AdBWH7jX Eo5aNREwJY0UK2vjGevUhu8nkMJldzspcHiJnLdO6zfa2PzdkKiT5qLgxFNy1EaDQs fMWgh2BkWIq+6Jxcc1COq8opBqlPaalGHhe0l1jw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Sasha Levin Subject: [PATCH 5.16 0399/1039] drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb Date: Mon, 24 Jan 2022 19:36:28 +0100 Message-Id: <20220124184138.729231144@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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: Miaoqian Lin [ Upstream commit 0589e8889dce8e0f0ea5bbf757f38865e2a469c1 ] Add the missing platform_device_put() before return from sysfb_create_simplefb() in the error handling case. Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20211231080431.15385-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/firmware/sysfb_simplefb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c index b86761904949c..303a491e520d1 100644 --- a/drivers/firmware/sysfb_simplefb.c +++ b/drivers/firmware/sysfb_simplefb.c @@ -113,12 +113,16 @@ __init int sysfb_create_simplefb(const struct screen_info *si, sysfb_apply_efi_quirks(pd); ret = platform_device_add_resources(pd, &res, 1); - if (ret) + if (ret) { + platform_device_put(pd); return ret; + } ret = platform_device_add_data(pd, mode, sizeof(*mode)); - if (ret) + if (ret) { + platform_device_put(pd); return ret; + } return platform_device_add(pd); } -- 2.34.1