[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210607205007.71458-2-andy.shevchenko@gmail.com>
Date: Mon, 7 Jun 2021 23:50:06 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH v2 2/3] usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource()
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")
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
---
v2: added Rb tag (Heikki)
drivers/usb/typec/mux/intel_pmc_mux.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
index 221aa1c0e77a..34e1662ad6ef 100644
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -604,6 +604,11 @@ static int pmc_usb_probe_iom(struct pmc_usb *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;
--
2.32.0
Powered by blists - more mailing lists