diff options
author | Andy Shevchenko <[email protected]> | 2021-06-07 23:50:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-06-09 10:56:11 +0200 |
commit | 843fabdd7623271330af07f1b7fbd7fabe33c8de (patch) | |
tree | 714bdc4d57dd30604edd7d066fe148af29734f5d | |
parent | 1a85b350a7741776a406005b943e3dec02c424ed (diff) |
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")
Reviewed-by: Heikki Krogerus <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: stable <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/typec/mux/intel_pmc_mux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c index 96d8c5a04680..31b1b3b555c7 100644 --- 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_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; |