Re: [bug report] drm/nouveau/mmu/r535: initial support

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

 



On Tue, 2023-11-07 at 17:32 +0300, Dan Carpenter wrote:
>     170         ret = gf100_bar_new_(rm, device, type, inst, &bar);
> --> 171         *pbar = bar;
>     172         if (ret) {
>     173                 if (!bar)
>                             ^^^^
> If gf100_bar_new_() fails then bar isn't initialized.  Do we really
> need to initialize bar to NULL on error?  If so then we should do it
> before the "rm = kzalloc()".

We can just do this:

struct nvkm_bar *bar = NULL;




[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