[PATCH v2] drm/amdgpu: fix null pointer reference to adev.
lepton
ytht.net at gmail.com
Tue Jul 7 18:26:55 UTC 2020
On Tue, Jul 7, 2020 at 11:22 AM Alex Deucher <alexdeucher at gmail.com> wrote:
>
> On Tue, Jul 7, 2020 at 2:15 PM Lepton Wu <ytht.net at gmail.com> wrote:
> >
> > I hit this when compiling amdgpu in kernel. amdgpu_driver_load_kms fail
> > to load firmwares since GPU was initialized before rootfs is ready.
> > Just gracefully fail in such cases.
> >
> > v2: Check return code of amdgpu_driver_load_kms
> >
> > Signed-off-by: Lepton Wu <ytht.net at gmail.com>
>
> Already fixed:
> https://cgit.freedesktop.org/drm/drm/commit/?id=7504d3bbec7da70516a13e34415b92bf5203399a
Nice, next time I will check drm tree instead of Linus tree for drm
related stuff.
>
> Alex
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index 126e74758a34..75bcd1789185 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -1111,7 +1111,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
> >
> > pci_set_drvdata(pdev, dev);
> >
> > - amdgpu_driver_load_kms(dev, ent->driver_data);
> > + ret = amdgpu_driver_load_kms(dev, ent->driver_data);
> > + if (ret)
> > + goto err_pci;
> >
> > retry_init:
> > ret = drm_dev_register(dev, ent->driver_data);
> > --
> > 2.27.0.212.ge8ba1cc988-goog
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list