[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210614102701.424401839@linuxfoundation.org>
Date: Mon, 14 Jun 2021 12:27:10 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH 5.12 098/173] usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource()
From: Andy Shevchenko <andy.shevchenko@...il.com>
commit 843fabdd7623271330af07f1b7fbd7fabe33c8de upstream.
devm_ioremap_resource() can return an error, add missed check for it.
Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect")
Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: stable <stable@...r.kernel.org>
Link: https://lore.kernel.org/r/20210607205007.71458-2-andy.shevchenko@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/usb/typec/mux/intel_pmc_mux.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -586,6 +586,11 @@ static int pmc_usb_probe_iom(struct pmc_
return -ENOMEM;
}
+ if (IS_ERR(pmc->iom_base)) {
+ put_device(&adev->dev);
+ return PTR_ERR(pmc->iom_base);
+ }
+
pmc->iom_adev = adev;
return 0;
Powered by blists - more mailing lists