diff mbox

ACPI / LPSS: check the result of ioremap

Message ID 1420703845-85859-1-git-send-email-heikki.krogerus@linux.intel.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Heikki Krogerus Jan. 8, 2015, 7:57 a.m. UTC
If it fails we have to skip the device.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/acpi/acpi_lpss.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rafael J. Wysocki Jan. 11, 2015, 10:35 p.m. UTC | #1
On Thursday, January 08, 2015 09:57:25 AM Heikki Krogerus wrote:
> If it fails we have to skip the device.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

"stable" stuff?  Which version if so?

> ---
>  drivers/acpi/acpi_lpss.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index 4f3febf..d12f98a 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -340,6 +340,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
>  				pdata->mmio_size = resource_size(&rentry->res);
>  			pdata->mmio_base = ioremap(rentry->res.start,
>  						   pdata->mmio_size);
> +			if (!pdata->mmio_base)
> +				goto err_out;
>  			break;
>  		}
>  
>
Heikki Krogerus Jan. 12, 2015, 7:28 a.m. UTC | #2
On Sun, Jan 11, 2015 at 11:35:30PM +0100, Rafael J. Wysocki wrote:
> On Thursday, January 08, 2015 09:57:25 AM Heikki Krogerus wrote:
> > If it fails we have to skip the device.
> > 
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> 
> "stable" stuff?  Which version if so?

Not stable stuff. v3.20.

Cheers,
Rafael J. Wysocki Jan. 30, 2015, 12:06 a.m. UTC | #3
On Monday, January 12, 2015 09:28:04 AM Heikki Krogerus wrote:
> On Sun, Jan 11, 2015 at 11:35:30PM +0100, Rafael J. Wysocki wrote:
> > On Thursday, January 08, 2015 09:57:25 AM Heikki Krogerus wrote:
> > > If it fails we have to skip the device.
> > > 
> > > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > 
> > "stable" stuff?  Which version if so?
> 
> Not stable stuff. v3.20.

Queued up for 3.20 then, thanks!
diff mbox

Patch

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 4f3febf..d12f98a 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -340,6 +340,8 @@  static int acpi_lpss_create_device(struct acpi_device *adev,
 				pdata->mmio_size = resource_size(&rentry->res);
 			pdata->mmio_base = ioremap(rentry->res.start,
 						   pdata->mmio_size);
+			if (!pdata->mmio_base)
+				goto err_out;
 			break;
 		}