Re: [bug report] drm/nouveau/gsp/r535: add support for booting GSP-RM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



On Tue, Nov 07, 2023 at 08:06:25PM +0100, Danilo Krummrich wrote:
> On 11/7/23 20:00, Danilo Krummrich wrote:
> > On 11/7/23 15:34, Dan Carpenter wrote:
> > > Hello Ben Skeggs,
> > > 
> > > The patch 176fdcbddfd2: "drm/nouveau/gsp/r535: add support for
> > > booting GSP-RM" from Sep 19, 2023 (linux-next), leads to the
> > > following Smatch static checker warning:
> > > 
> > >     drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1016 r535_gsp_rpc_unloading_guest_driver()
> > >     warn: 'rpc' isn't an ERR_PTR
> > > 
> > > drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> > >      1010 static int
> > >      1011 r535_gsp_rpc_unloading_guest_driver(struct nvkm_gsp *gsp, bool suspend)
> > >      1012 {
> > >      1013         rpc_unloading_guest_driver_v1F_07 *rpc;
> > >      1014
> > >      1015         rpc = nvkm_gsp_rpc_get(gsp, NV_VGPU_MSG_FUNCTION_UNLOADING_GUEST_DRIVER, sizeof(*rpc));
> > > 
> > > nvkm_gsp_rpc_get() returns NULL on error.
> > 
> > There are also code paths where it can return an ERR_PTR. I think we need to check for IS_ERR_OR_NULL()...
> 
> Sorry, this is wrong, I just saw that r535_gsp_cmdq_get() calls r535_gsp_cmdq_get()
> which returns an ERR_PTR. Put it neither handles the return value of
> r535_gsp_cmdq_get() as ERR_PTR nor does it pass it through.

Sorry, I wrote this bug report badly...  Let me just send a patch.

regards,
dan carpenter




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux