drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c:201:1-3: WARNING: PTR_ERR_OR_ZERO can be used

From: kbuild test robot
Date: Wed Oct 14 2015 - 06:11:58 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5b5f1455272e23f4e7889cec37228802d8d01adf
commit: c4d0f8f6f8c8dc09cd32e7fdb31e3d1a65a0f8f1 drm/nouveau/gr/gk20a: use same initialization sequence as nvgpu
date: 7 weeks ago


coccinelle warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c:201:1-3: WARNING: PTR_ERR_OR_ZERO can be used

vim +201 drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c

185 if (IS_ERR(priv->fuc_sw_ctx))
186 return PTR_ERR(priv->fuc_sw_ctx);
187
188 err = gf100_gr_ctor_fw(priv, "sw_bundle_init", &fuc);
189 if (err)
190 return err;
191 priv->fuc_bundle = gk20a_gr_av_to_init(&fuc);
192 gf100_gr_dtor_fw(&fuc);
193 if (IS_ERR(priv->fuc_bundle))
194 return PTR_ERR(priv->fuc_bundle);
195
196 err = gf100_gr_ctor_fw(priv, "sw_method_init", &fuc);
197 if (err)
198 return err;
199 priv->fuc_method = gk20a_gr_av_to_method(&fuc);
200 gf100_gr_dtor_fw(&fuc);
> 201 if (IS_ERR(priv->fuc_method))
202 return PTR_ERR(priv->fuc_method);
203
204 return 0;
205 }
206
207 static void
208 gk20a_gr_dtor(struct nvkm_object *object)
209 {

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/