On Sun, Jun 06, 2021 at 11:09:10PM +0300, Andy Shevchenko wrote: > 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") > Cc: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> > Signed-off-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> > --- > 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 134325444e6a..de40276cc18b 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; > -- > 2.31.1 -- heikki