projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc3109a
)
drm/nvc0/graph: remove redundant null checks
author
Marcin Slusarz
<
[email protected]
>
Sun, 27 Jan 2013 15:11:18 +0000
(16:11 +0100)
committer
Ben Skeggs
<
[email protected]
>
Wed, 20 Feb 2013 06:00:37 +0000
(16:00 +1000)
It's safe to call kfree(NULL).
Found by smatch.
Signed-off-by: Marcin Slusarz <
[email protected]
>
Signed-off-by: Ben Skeggs <
[email protected]
>
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
index 15bfe55f510936339dc8a4b96351126e2ee5b590..0de0dd724afff9643125a0ed2bf11e74e231353b 100644
(file)
--- a/
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+++ b/
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
@@
-613,10
+613,8
@@
nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
static void
nvc0_graph_dtor_fw(struct nvc0_graph_fuc *fuc)
{
- if (fuc->data) {
- kfree(fuc->data);
- fuc->data = NULL;
- }
+ kfree(fuc->data);
+ fuc->data = NULL;
}
void
@@
-624,8
+622,7
@@
nvc0_graph_dtor(struct nouveau_object *object)
{
struct nvc0_graph_priv *priv = (void *)object;
- if (priv->data)
- kfree(priv->data);
+ kfree(priv->data);
nvc0_graph_dtor_fw(&priv->fuc409c);
nvc0_graph_dtor_fw(&priv->fuc409d);