[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VdOdwDpJpe-Xg2ogEx0sZ2QsnO0Xcc+Ajn5aaRh2p3h9g@mail.gmail.com>
Date: Tue, 20 Feb 2018 16:04:54 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Christian König <ckoenig.leichtzumerken@...il.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-pci@...r.kernel.org
Subject: Re: [PATCH] PCI: stop crashing in pci_release_resource
On Tue, Feb 20, 2018 at 10:58 AM, Christian König
<ckoenig.leichtzumerken@...il.com> wrote:
> Is it entirely possible that the BIOS wasn't able to assign resources to
> a device. In this case don't crash in pci_release_resource() when we try
> to resize the resource.
> struct resource *res = dev->resource + resno;
>
> + if (!res->parent)
> + return;
> +
> dev_info(&dev->dev, "BAR %d: releasing %pR\n", resno, res);
I would find info message is useful even in such case.
> release_resource(res);
> res->end = resource_size(res) - 1;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists