From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8DE610F2 for ; Wed, 20 May 2026 15:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779289700; cv=none; b=g0pUu2pYlJcyFkjD31yOdFs/YZSa4GAjkrYCix9rQRt0UzbYS6ejSzz5kCveEDb7s2sFJMgEsJMKsH36/oJHhPs578I4NnUsX6VKvrCZ4PyA2HkeO/FmV7MUztWjS8LSXLdqeZYyogZLUvi+WWc8qKW7GxLFad3k+4a5GWPJnp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779289700; c=relaxed/simple; bh=KKALd+utaY5KmOci5lJ/bF9rutNPQQXbSDk7KhoN0ZI=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=RRhRYbYaSaoKN5MVmhp7GpioMUWFSJYUE5lexqqUU6uKd/dIB8pIXt/tbDuvc0nvQpxc7z3c/T+U7aVNeXZtoQHVNRFPN4UgBSbtVUHwCdz+YA0la2q5iih2Z+SB/7K+UAAz5S7FWC/fYK88ZqoXShPZ1wv7y/MfQeYnZUsXC/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qx8DVkld; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Qx8DVkld" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00B9E1F000E9; Wed, 20 May 2026 15:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779289699; bh=mF7++1JrMijyMLH0tcOJFfXnKGXWe4FUsg+4I5PD9Xw=; h=Subject:To:Cc:From:Date; b=Qx8DVkldDuxe53z/dwxR8CjfzOdhEmV5Ekf1cWdYro3fU48fZkzE8mccggEl+Ageg TgadvZhDyiEn5GkyOLxzlQy7tPp4mh2RFVhTC9QXcnNWypFDblSGyl7m0JjsuzKaXO UDxcixGWQNNjhcj5kp8rGIYRFSvy/R1cAzccFdK0= Subject: FAILED: patch "[PATCH] drm/gma500/oaktrail_lvds: fix i2c adapter leaks on init" failed to apply to 5.15-stable tree To: johan@kernel.org,patrik.r.jakobsson@gmail.com Cc: From: Date: Wed, 20 May 2026 17:08:22 +0200 Message-ID: <2026052022-lizard-pediatric-51d1@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x 84d1c9b416d54afe760ca4c378bd95c89261254c # git commit -s git send-email --to '' --in-reply-to '2026052022-lizard-pediatric-51d1@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 84d1c9b416d54afe760ca4c378bd95c89261254c Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 8 May 2026 16:44:46 +0200 Subject: [PATCH] drm/gma500/oaktrail_lvds: fix i2c adapter leaks on init The LVDS init code looks up an I2C adapter using i2c_get_adapter() and tries to read the EDID before falling back to allocating and registering its own adapter. Make sure to drop the references taken by i2c_get_adapter() when falling back to allocating an adapter as well as on late errors to allow the looked up adapter to be deregistered. Fixes: 1b082ccf5901 ("gma500: Add Oaktrail support") Cc: stable@vger.kernel.org # 3.3 Signed-off-by: Johan Hovold Signed-off-by: Patrik Jakobsson Link: https://patch.msgid.link/20260508144446.59722-4-johan@kernel.org diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c index 983cc60a1e69..e194d0cce067 100644 --- a/drivers/gpu/drm/gma500/oaktrail_lvds.c +++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c @@ -367,6 +367,8 @@ void oaktrail_lvds_init(struct drm_device *dev, if (edid == NULL && dev_priv->lpc_gpio_base) { ddc_bus = oaktrail_lvds_i2c_init(dev); if (!IS_ERR(ddc_bus)) { + if (i2c_adap) + i2c_put_adapter(i2c_adap); i2c_adap = &ddc_bus->base; edid = drm_get_edid(connector, i2c_adap); } @@ -423,6 +425,8 @@ err_unlock: mutex_unlock(&dev->mode_config.mutex); if (!IS_ERR_OR_NULL(ddc_bus)) gma_i2c_destroy(ddc_bus); + else if (i2c_adap) + i2c_put_adapter(i2c_adap); drm_encoder_cleanup(encoder); err_connector_cleanup: drm_connector_cleanup(connector);