Re: [PATCH 1/2] New Driver for IOSF-SB MBI access on Intel SOCs

From: One Thousand Gnomes
Date: Sat Nov 23 2013 - 19:44:26 EST


On Thu, 21 Nov 2013 22:05:56 -0800
"David E. Box" <david.e.box@xxxxxxxxxxxxxxx> wrote:

> +static int iosf_mbi_probe(struct platform_device *pdev)
> +{
> + struct resource *mem;
> +
> + /* Get and map MBI address space */
> + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + iosf_mbi_data.addr = devm_ioremap_resource(&pdev->dev, mem);

Purely "defensive driv(er)ing" but platform_get_resource can return NULL

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/