drm/nouveau/secboot/gm20b: initialize pointer in gm20b_secboot_new()
[ Upstream commit3613a9bea9] We accidentally set "psb" which is a no-op instead of "*psb" so it generates a static checker warning. We should probably set it before the first error return so that it's always initialized. Fixes:923f1bd27b("drm/nouveau/secboot/gm20b: add secure boot support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8ca41215c6
commit
4653672d2b
1 changed files with 2 additions and 3 deletions
|
|
@ -108,6 +108,7 @@ gm20b_secboot_new(struct nvkm_device *device, int index,
|
|||
struct gm200_secboot *gsb;
|
||||
struct nvkm_acr *acr;
|
||||
|
||||
*psb = NULL;
|
||||
acr = acr_r352_new(BIT(NVKM_SECBOOT_FALCON_FECS) |
|
||||
BIT(NVKM_SECBOOT_FALCON_PMU));
|
||||
if (IS_ERR(acr))
|
||||
|
|
@ -116,10 +117,8 @@ gm20b_secboot_new(struct nvkm_device *device, int index,
|
|||
acr->optional_falcons = BIT(NVKM_SECBOOT_FALCON_PMU);
|
||||
|
||||
gsb = kzalloc(sizeof(*gsb), GFP_KERNEL);
|
||||
if (!gsb) {
|
||||
psb = NULL;
|
||||
if (!gsb)
|
||||
return -ENOMEM;
|
||||
}
|
||||
*psb = &gsb->base;
|
||||
|
||||
ret = nvkm_secboot_ctor(&gm20b_secboot, acr, device, index, &gsb->base);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue