From nobody Fri Jun 12 13:56:07 2026 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 841604219F2 for ; Thu, 14 May 2026 14:38:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778769488; cv=none; b=jqFPLO4QgyDK8JrLwd7ZxgmSTPqpZ7QTqtavfARLRPESH35/OwtzxAd2G+ZPblsO2XtnQUlJEOGkrZocbrlr6MnNi0oabx7w6kVW4Vu29TmtBdeh75KmeVi4wSm+ZX1WkEO2tixHuHxO2YmN0gueUn0Ru5x8bC//3rqXmYRWA2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778769488; c=relaxed/simple; bh=zluCpqhMM6VvBgJlcAiGgCuazimnhyHm88ivrs6R8LY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IA8kJi7+p/jjoknywLshk5olHtvRiyLHhPdA36AFROS/kRa+gUuY10DYW7lycQJ15Z/j/tjoJRnO5K+uZC8ok7Y5x185fTIDFFXbRI+Xm44khY+oEA+QmDImbX+FGtA35maec3ypj5iiC1oFSPKkM8o0XH3I2v9wea7lfCFyfnY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Kcr8LY88; arc=none smtp.client-ip=209.85.208.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kcr8LY88" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-393841c70a2so9730671fa.2 for ; Thu, 14 May 2026 07:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778769484; x=1779374284; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xjPi7BZ5+dULqS5lccVpY5SGYZnwsN2PwYz3FOHrrHg=; b=Kcr8LY88vzRSTMpMO9bb/Ov3tYmMrPDJaj0LlelqVAN7oxL7wdHs+9+IFM9ZsesDej C2HEw4xbmgcnPZYTUBfSJSnROGj59qkn2UFeLJ6VOkxbbOgcvW5pN32I3MPtq0rMjnfN Rlgvwm1e8VSZuoWy54X+MnT7lV/ZQkCD3IScMDnuqmxmMOUKbmyuUikgFNKjM3UDxe14 cXk8AmQMC7scSMnPi3dLluIP7drQM26jK4PPKg9qTa9wF6GJvXdyve5sJzh/mGx+08Bo ucM+tVmGqT94xV4njLr79DT3NWcsQseEXAc8TJ04hZFu4Ih+cS9eNjlHGrgWhRZKYURY gwww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778769484; x=1779374284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xjPi7BZ5+dULqS5lccVpY5SGYZnwsN2PwYz3FOHrrHg=; b=J9qnyNER7RWoKzPQYkz2xG2Y39gXi9fQhhLdW1h5556jTx036ZgYxzzAtJQmlFcWHM I3wdu+su127DROagiXQt5m/Ab174IhZ+VH0UgJ6cFA1cLAcBUI814EVH/ShGp3i9Za9I aIt7UdoHXu3Rr7KVZLxV9FvkUTSgN08jyNTDmhLKMJKrf8cf8ghFN/Pvd7sMzxwyis6L zGSfbdpkgt14495NAA5hQLwqIBwpGJVhgdj9GoqlW2XAWBkd5INInE9qTYD608sJjhrp vvi2XVuH00GzQ+0jFPOCV6iulyuTe9bQWBomLrWD7fZhX/JtK/qFEaBoRMXQqaldQdxE ItMA== X-Forwarded-Encrypted: i=1; AFNElJ95an2CGGlw2nCRAlMburxTRhU2K/vKantxanBLbzE/ZqUD0lxmYven/zYRZTMePQ/N7QGf/fon9SSHSfY=@vger.kernel.org X-Gm-Message-State: AOJu0YwyzLeXvgZcjsrFWnUTuuhj1fdWe+dgo+mJRbD/c5NW/naO2G2J haTcMnnkPAPQV1vA5nVK8YCebqjTjJyia2GOsdm/GjS+gKCCPgQevQFf X-Gm-Gg: Acq92OERCV7QTPSIxgezl7UH/PKjzsKdilDnK/vn0jLiZ8Bg1iShiMwG0eCeDxrxIuD 7hlOZ1nXCCMOLQx8arLfAjA1VqVJxjKwQqj1EDWX7qQy5ZT2ym3F4sWdxV2lwVW+hbz0uvzRbuL yFWcy12+ED7ivWeoypBzSIbRgawIMwmDs9wB9qJF+BrM77momQZjZlMvQ6mm51mB8hTujDnWpVP 3HJ0Tgq0P1udCrag89rIVtQYDkwXKLqTimQNVcuuC75d+gsZV53QivT4WUQexeBwyEwnCbNJrYQ mg4pOCS7w9GQSFaLIfXsc2mKz+Sy4wUHjKlH0mdKZ5oQcR9vV2ilPLToXCldZN54hwpz53q9IEL 38v6aaTI7vvIazAe3bDmi+M1ZLt+196FAqjksmeOvDGNEjNudesGwRS1m2g6K7NQGqSVCGY3Zaa ujny0W7PS3yWJEK7XLOqCbwZngLPI3pSA+jRiWA3gkJb/K1JE= X-Received: by 2002:a05:6512:1288:b0:5a8:7c42:bebe with SMTP id 2adb3069b0e04-5a8ef9a8fc3mr1056037e87.4.1778769484152; Thu, 14 May 2026 07:38:04 -0700 (PDT) Received: from localhost.localdomain ([144.124.192.245]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a90f10c578sm518716e87.12.2026.05.14.07.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 07:38:03 -0700 (PDT) From: Stepan Ionichev To: ilpo.jarvinen@linux.intel.com Cc: andriy.shevchenko@linux.intel.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, sozdayvek@gmail.com Subject: [PATCH 1/2] serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails Date: Thu, 14 May 2026 19:37:45 +0500 Message-Id: <20260514143746.23671-2-sozdayvek@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20260514143746.23671-1-sozdayvek@gmail.com> References: <20260514143746.23671-1-sozdayvek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" dw8250_probe() registers the 8250 port via serial8250_register_8250_port() and then, if the device has a clock, registers a clock notifier. If clk_notifier_register() fails, probe returns the error but leaves the 8250 port registered. The matching serial8250_unregister_port() lives in dw8250_remove(), which is not called when probe fails, so the port slot stays occupied until the device is rebound or the system is rebooted. The devm-allocated driver data is freed while the port still references it (via the saved private_data and serial_in/serial_out callbacks), so any access to that port slot before a rebind is a use-after-free hazard. Unregister the port on the clk_notifier_register() error path. Fixes: cc816969d7b5 ("serial: 8250_dw: Fix common clocks usage race conditi= on") Cc: stable@vger.kernel.org Signed-off-by: Stepan Ionichev Reviewed-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_dw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/82= 50_dw.c index 94beadb40..7dbd79a91 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -850,8 +850,10 @@ static int dw8250_probe(struct platform_device *pdev) */ if (data->clk) { err =3D clk_notifier_register(data->clk, &data->clk_notifier); - if (err) + if (err) { + serial8250_unregister_port(data->data.line); return dev_err_probe(dev, err, "Failed to set the clock notifier\n"); + } queue_work(system_dfl_wq, &data->clk_work); } =20 --=20 2.43.0 From nobody Fri Jun 12 13:56:07 2026 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D806425CDD for ; Thu, 14 May 2026 14:38:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778769490; cv=none; b=gS9jVovJl3gKj4Y83hj90dPFHTVELGn71cr4mV40rJr+z2yPzvwcVs7wRSm0jT44yFPKgXdmAVKpID32mJh1oeTTDc15NVmQXkqK+WBrh86uYEdbNtL1TH9fOytmw5KGcGZTzuux+ic771G1juDfNajtyoCNuCEiF8Z8Asaotxk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778769490; c=relaxed/simple; bh=SGen0cAI8+jw73WuKJHAtUiwrOtLJHmirFzTJNCp9XU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VNIaeRdDhYbMrwvuPvji/IpQMxIoiGUofpE6C5weNwurNQJZfix1FA4IE9wPkgN9Pz71gnWKfKdD1qjVgzHY7hFjsi80ZBOpY8S4YUn4fkWb/lDsAnerdrlGDTnEuqQ+8ar8NQFfM43JHIsSTzDVPCuB27TISCl491IIRM18go0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kK7OB0ku; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kK7OB0ku" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5a8ccfcbb3fso428195e87.2 for ; Thu, 14 May 2026 07:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778769486; x=1779374286; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F4W/+uaY1ucSCdVdyhDwD7Z4d6rSXxFokJhSb7BC4Ng=; b=kK7OB0kurzXg1SEyYIr1n5rfo/0IrVAiHsHp5jRbU0loUoWjxJHoyUCSqNexepnBoy UFO6FCZQ98vTK5ZvOXTcr0j4SWcmLf+dLmtsWzRsGjHRX7IDb7U2Ocb6xHNS5pcw5Xu1 D3554HvV6IpZMYjFW2MWxjXEDb41/HPVPKqPBfHfW+v7Ti+ib0wMa4Y8/LLoKrNIO9WX 1XyLWeTczzdaITU1uTyPiCPwLyVtideA1Qh4AsMFfPZo6CKwagavxEYKjZBFEPej97SD CZPzGdTSWfQomf9ZWRdSYUbZCVzbMurZhhclpHHdyOChJzR/eCQeCp4Na9eS2Rzl39xo iW1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778769486; x=1779374286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F4W/+uaY1ucSCdVdyhDwD7Z4d6rSXxFokJhSb7BC4Ng=; b=auhwqJVB94IOHIpojg2PwCbxg03YZOc/w9b3xr1NKl+M8CgFIuFlvhMrGNdDW0YMX7 dtonSPS9l3Yo2KTQ+hoIBW/UTYsxtds8RqxtOr5f9Spx7IiPpsP5VEbXGL7M/9HGghpu 3x4mqQ9NTc58pDejqyEg1xj8jNLgJ/c0oIYWeIgm0y9TXIpOkBDlfWbimA1kvLYPmKYB gNi/GaaO6F22GbxfTjJG2mU51L4qNuE1+wz44oJY+3VqNfBzXxx8VU5s/suancRuLSLI Rjg1kAxlgAwAQvdQoZEZac0gXwAaBlaj3egUncJLj9s2x2ZQUW10ILZKsEPUKm0G5PGs nf8g== X-Forwarded-Encrypted: i=1; AFNElJ9VFxNEr5SHs3RJrw+AYsqetCcuzmYEVcAHozLw2Zgj5rsZNePGh2kg3i2MpPihmOFkG1+X+YHaq2jTr1Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwblF95LcPWCQoc8NVt7C6FPaUWAaxsxLpp96CCnPC8++Iuno7Y kpYlTj/NxC8H+JJ20Dyww32Bo8meC8zsJ/Pie3e8xnu7R6ihKu3BZGQz X-Gm-Gg: Acq92OGBzTEQPr0l4zoRdPVZ1Rm3tqZsq9I1fblj9LQ1pMMZQUahOKWhXzPS4/TRVOP NZ0olu7AmcKfL1SkTJFV3x7o7KaXeBy0zpDwLcKh5DR6R3c0hSIjmfkBMZpgRBKlivNtUP368tI c/8h+6iv/KzsVZb/eNTvggrpyTapXmjSiqFkC8soOXKWWS7IzD7upZLTh74CNfk0+NKanM5XrWm zkHW6ZsG6ITMfl8y4G4VP4v63gntHfcfzoQf7LqjP8St25SUbWE0wCgg3Rw6xSo23uPOatqbIOX TjKLKjpH+IWgV1xe1R4zezkv1qq8Rdw5DKGomM6rbLvTpC5QqeS32MkfN+jPMX/LeUGrAL4QcTO iF2ngrOVySDiGp7QOfRC3O/rjL6kzd9M6R2yq4abR5gFDs5JoWpT8CR/A4ghNl8PwEz7pfkxDn0 q12iJ0oRg8cSJIM0DuETaw7T87v58Quj172ixVey1U+Y3MsPHFYpjsHxgfhw== X-Received: by 2002:a05:6512:39c2:b0:5a8:847a:dee2 with SMTP id 2adb3069b0e04-5a8ef9a9b90mr1051021e87.3.1778769486083; Thu, 14 May 2026 07:38:06 -0700 (PDT) Received: from localhost.localdomain ([144.124.192.245]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a90f10c578sm518716e87.12.2026.05.14.07.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 07:38:05 -0700 (PDT) From: Stepan Ionichev To: ilpo.jarvinen@linux.intel.com Cc: andriy.shevchenko@linux.intel.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, sozdayvek@gmail.com Subject: [PATCH 2/2] serial: 8250_dw: remove clock-notifier infrastructure Date: Thu, 14 May 2026 19:37:46 +0500 Message-Id: <20260514143746.23671-3-sozdayvek@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20260514143746.23671-1-sozdayvek@gmail.com> References: <20260514143746.23671-1-sozdayvek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The clock notifier and matching work_struct in dw8250_data were added in 2020 for the Baikal-T1 SoC, whose multiple UART ports share a single reference clock and need to be informed when another consumer re-rates that clock. Baikal SoC support has since been removed from the kernel (see e.g. commit 5d6c477687ae ("clk: baikal-t1: Remove not-going-to-be-supported code for Baikal SoC") and the matching removals across bus/, mtd/, PCI/, hwmon/, memory/). No remaining in-tree user needs the cross-device baudclk rate-change notification path: the only configuration that wired up the notifier was Baikal-T1's shared reference clock topology. Drop the now-unused clock-notifier and its deferred-update worker: - struct dw8250_data fields clk_notifier and clk_work, - the clk_to_dw8250_data() and work_to_dw8250_data() helpers, - the dw8250_clk_work_cb() and dw8250_clk_notifier_cb() callbacks, - the INIT_WORK / notifier_call setup in dw8250_probe(), - the clk_notifier_register() / queue_work() in dw8250_probe(), - the matching clk_notifier_unregister() / flush_work() in dw8250_remove(), - the stale comment in dw8250_set_termios() about the worker blocking, - the linux/notifier.h and linux/workqueue.h includes that are no longer used. dw8250_set_termios() keeps calling clk_set_rate() directly, which is all the remaining single-UART configurations require. Signed-off-by: Stepan Ionichev Reviewed-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_dw.c | 81 ------------------------------- 1 file changed, 81 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/82= 50_dw.c index 7dbd79a91..41c5abccd 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -19,13 +19,11 @@ #include #include #include -#include #include #include #include #include #include -#include =20 #include =20 @@ -86,8 +84,6 @@ struct dw8250_data { u32 msr_mask_off; struct clk *clk; struct clk *pclk; - struct notifier_block clk_notifier; - struct work_struct clk_work; struct reset_control *rst; =20 unsigned int skip_autocfg:1; @@ -102,16 +98,6 @@ static inline struct dw8250_data *to_dw8250_data(struct= dw8250_port_data *data) return container_of(data, struct dw8250_data, data); } =20 -static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block= *nb) -{ - return container_of(nb, struct dw8250_data, clk_notifier); -} - -static inline struct dw8250_data *work_to_dw8250_data(struct work_struct *= work) -{ - return container_of(work, struct dw8250_data, clk_work); -} - static inline u32 dw8250_modify_msr(struct uart_port *p, unsigned int offs= et, u32 value) { struct dw8250_data *d =3D to_dw8250_data(p->private_data); @@ -484,46 +470,6 @@ static int dw8250_handle_irq(struct uart_port *p) return 1; } =20 -static void dw8250_clk_work_cb(struct work_struct *work) -{ - struct dw8250_data *d =3D work_to_dw8250_data(work); - struct uart_8250_port *up; - unsigned long rate; - - rate =3D clk_get_rate(d->clk); - if (rate <=3D 0) - return; - - up =3D serial8250_get_port(d->data.line); - - serial8250_update_uartclk(&up->port, rate); -} - -static int dw8250_clk_notifier_cb(struct notifier_block *nb, - unsigned long event, void *data) -{ - struct dw8250_data *d =3D clk_to_dw8250_data(nb); - - /* - * We have no choice but to defer the uartclk update due to two - * deadlocks. First one is caused by a recursive mutex lock which - * happens when clk_set_rate() is called from dw8250_set_termios(). - * Second deadlock is more tricky and is caused by an inverted order of - * the clk and tty-port mutexes lock. It happens if clock rate change - * is requested asynchronously while set_termios() is executed between - * tty-port mutex lock and clk_set_rate() function invocation and - * vise-versa. Anyway if we didn't have the reference clock alteration - * in the dw8250_set_termios() method we wouldn't have needed this - * deferred event handling complication. - */ - if (event =3D=3D POST_RATE_CHANGE) { - queue_work(system_dfl_wq, &d->clk_work); - return NOTIFY_OK; - } - - return NOTIFY_DONE; -} - static void dw8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old) { @@ -547,10 +493,6 @@ static void dw8250_set_termios(struct uart_port *p, st= ruct ktermios *termios, clk_disable_unprepare(d->clk); rate =3D clk_round_rate(d->clk, newrate); if (rate > 0) { - /* - * Note that any clock-notifier worker will block in - * serial8250_update_uartclk() until we are done. - */ ret =3D clk_set_rate(d->clk, newrate); if (!ret) p->uartclk =3D rate; @@ -783,9 +725,6 @@ static int dw8250_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(data->clk), "failed to get baudclk\n"); =20 - INIT_WORK(&data->clk_work, dw8250_clk_work_cb); - data->clk_notifier.notifier_call =3D dw8250_clk_notifier_cb; - if (data->clk) p->uartclk =3D clk_get_rate(data->clk); =20 @@ -843,20 +782,6 @@ static int dw8250_probe(struct platform_device *pdev) if (data->data.line < 0) return data->data.line; =20 - /* - * Some platforms may provide a reference clock shared between several - * devices. In this case any clock state change must be known to the - * UART port at least post factum. - */ - if (data->clk) { - err =3D clk_notifier_register(data->clk, &data->clk_notifier); - if (err) { - serial8250_unregister_port(data->data.line); - return dev_err_probe(dev, err, "Failed to set the clock notifier\n"); - } - queue_work(system_dfl_wq, &data->clk_work); - } - platform_set_drvdata(pdev, data); =20 pm_runtime_enable(dev); @@ -871,12 +796,6 @@ static void dw8250_remove(struct platform_device *pdev) =20 pm_runtime_get_sync(dev); =20 - if (data->clk) { - clk_notifier_unregister(data->clk, &data->clk_notifier); - - flush_work(&data->clk_work); - } - serial8250_unregister_port(data->data.line); =20 pm_runtime_disable(dev); --=20 2.43.0