Commit fd69aee4 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Ben Skeggs

drm/nvc0/graph: remove redundant null checks

It's safe to call kfree(NULL).

Found by smatch.
Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent fc3109a2
......@@ -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;
}
}
void
......@@ -624,7 +622,6 @@ nvc0_graph_dtor(struct nouveau_object *object)
{
struct nvc0_graph_priv *priv = (void *)object;
if (priv->data)
kfree(priv->data);
nvc0_graph_dtor_fw(&priv->fuc409c);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment