Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3661486pxb; Mon, 24 Jan 2022 14:44:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjg+TpykYDi3s/tsgK5Ugc021x8nkwDZqcObK+2henoF3Zky8yTXelv8PsjQ23rHVEkirl X-Received: by 2002:a63:1e1b:: with SMTP id e27mr13070119pge.348.1643064271221; Mon, 24 Jan 2022 14:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643064271; cv=none; d=google.com; s=arc-20160816; b=Pdl7uuV854c3q9IiPeP1aQ10m4hG+BPhd1d1l/FoF6T6sbz98sLjeNVumhb+plSHXg JzLi3Oiit4dWk3rFnb3oQE0J+jHfEITjpETUtufkbHNbdmNOVYeaXYjAaWIPC3RYYuET i6thRB/O5DAi5Gd8ner9ntSSP7evldEY/GjA1dAkuOSCRbsd1gYcgJWKwodl/ErR/7Qi W5EgpiaDrf2VJwrKLuZKfyM179vZ/5EMMqxapaSEpQYBlfeV1BI6MtN9qnXg/+j8NW7Z kVPAjjduoGWt42W9kEAOwEEY3StOowf4Z2UVPtL6yb002n4q70BefULmgH9SBJtVhrMB z40g== 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=Xa/vsRpurIzVM32nTwIUWnQZXGSbBiQGy/qnS8nZcFLdaOzygbqXwl/NyU93GjKR9I q0SJlm8mHZVu2n9XydcuKt8CqGATHS/HA+Z7t2UWT0MdhpryCRoKhSwV4HOaXan3AtEM wFJ2rlCSwC3VU0UjJRB1KyT/t65xbzOV+tE7DC/CobMWPJDcwaOJy2VtA4taJJE6sr4v LK2Fa3Zwcn3Ls7MkqInzugvEVasc9RUm/uB6OA3uNsnqKanB/wqXBsGRlWcPBE9m5s7J VD4I9WSOPGPWseoax2CQRX2FkswIYJyMXVh8piaRkuAiLwCeV12cyikqLiz0KvZF/pVH PqRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1f3XycK3; 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 t21si14434713pga.634.2022.01.24.14.44.18; Mon, 24 Jan 2022 14:44:31 -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=1f3XycK3; 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 S1837051AbiAXWmG (ORCPT + 99 others); Mon, 24 Jan 2022 17:42:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1457341AbiAXVlb (ORCPT ); Mon, 24 Jan 2022 16:41:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7186AC0419D4; Mon, 24 Jan 2022 12:28:08 -0800 (PST) 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 1343861513; Mon, 24 Jan 2022 20:28:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22CB0C340E5; Mon, 24 Jan 2022 20:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056087; bh=KRYqqgWjbG1axnu97YGHjeYl7Ss7mR3mkioLhNf+bLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1f3XycK3MDxy4zu+NAw7TzV6JYekAGX5AC5EPN7NrEzqi0JO1vZkyVrJYs4KLW6Q8 QGUPm5uknPt0lbgaaRTYSEdnzIjz+BqfW7srjVyK3O3+jUQ1xvWDi1w/Fy2xUb8IfO AUTQWHdSRxRKmop5CAifWMb8+L/hZa33srTQ3Tp0= 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.15 333/846] drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb Date: Mon, 24 Jan 2022 19:37:30 +0100 Message-Id: <20220124184112.401323857@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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