]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/nouveau/ibus: use nvkm_subdev_new_()
authorBen Skeggs <bskeggs@redhat.com>
Tue, 11 Feb 2020 07:36:49 +0000 (17:36 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:13:48 +0000 (11:13 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gp10b.c

index d80dbc8f09b2077c790f6ceb186faf504d0f07e6..2340040942c937c20dddd4bfd26a686df360596a 100644 (file)
@@ -114,9 +114,5 @@ int
 gf100_ibus_new(struct nvkm_device *device, int index,
               struct nvkm_subdev **pibus)
 {
-       struct nvkm_subdev *ibus;
-       if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
-               return -ENOMEM;
-       nvkm_subdev_ctor(&gf100_ibus, device, index, ibus);
-       return 0;
+       return nvkm_subdev_new_(&gf100_ibus, device, index, pibus);
 }
index 3905a80da811997566728bafd39a57050c2881e9..1124dadac145b7cb957542aa7da31724213b75f0 100644 (file)
@@ -43,9 +43,5 @@ int
 gf117_ibus_new(struct nvkm_device *device, int index,
               struct nvkm_subdev **pibus)
 {
-       struct nvkm_subdev *ibus;
-       if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
-               return -ENOMEM;
-       nvkm_subdev_ctor(&gf117_ibus, device, index, ibus);
-       return 0;
+       return nvkm_subdev_new_(&gf117_ibus, device, index, pibus);
 }
index 9025ed1bd2a990e872a14c3a3a653721b219840f..f3915f85838ed400e4dc3d4a5bc5b36f12b5591f 100644 (file)
@@ -117,9 +117,5 @@ int
 gk104_ibus_new(struct nvkm_device *device, int index,
               struct nvkm_subdev **pibus)
 {
-       struct nvkm_subdev *ibus;
-       if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
-               return -ENOMEM;
-       nvkm_subdev_ctor(&gk104_ibus, device, index, ibus);
-       return 0;
+       return nvkm_subdev_new_(&gk104_ibus, device, index, pibus);
 }
index 1a4ab825852ce2bf6649c28b8deacd9ace6f91ef..187d544378b04fa603ceba76360a2c0ffcb3b5f1 100644 (file)
@@ -81,9 +81,5 @@ int
 gk20a_ibus_new(struct nvkm_device *device, int index,
               struct nvkm_subdev **pibus)
 {
-       struct nvkm_subdev *ibus;
-       if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
-               return -ENOMEM;
-       nvkm_subdev_ctor(&gk20a_ibus, device, index, ibus);
-       return 0;
+       return nvkm_subdev_new_(&gk20a_ibus, device, index, pibus);
 }
index c63328152bfa669d17d642ab1f7a55045198326b..0f1f0ad6377e2fb875e5de6aa5e518f956376e34 100644 (file)
@@ -32,9 +32,5 @@ int
 gm200_ibus_new(struct nvkm_device *device, int index,
               struct nvkm_subdev **pibus)
 {
-       struct nvkm_subdev *ibus;
-       if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
-               return -ENOMEM;
-       nvkm_subdev_ctor(&gm200_ibus, device, index, ibus);
-       return 0;
+       return nvkm_subdev_new_(&gm200_ibus, device, index, pibus);
 }
index 39db90aa2c8066ee7ce728ac1d9705a01061444d..0347b367cefe47aaec103dc426a81db7866327ed 100644 (file)
@@ -51,9 +51,5 @@ int
 gp10b_ibus_new(struct nvkm_device *device, int index,
               struct nvkm_subdev **pibus)
 {
-       struct nvkm_subdev *ibus;
-       if (!(ibus = *pibus = kzalloc(sizeof(*ibus), GFP_KERNEL)))
-               return -ENOMEM;
-       nvkm_subdev_ctor(&gp10b_ibus, device, index, ibus);
-       return 0;
+       return nvkm_subdev_new_(&gp10b_ibus, device, index, pibus);
 }