mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 03:16:41 +07:00
drm/nvc0/graph: remove redundant null checks
It's safe to call kfree(NULL). Found by smatch. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
fc3109a2cb
commit
fd69aee427
@ -613,10 +613,8 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
|||||||
static void
|
static void
|
||||||
nvc0_graph_dtor_fw(struct nvc0_graph_fuc *fuc)
|
nvc0_graph_dtor_fw(struct nvc0_graph_fuc *fuc)
|
||||||
{
|
{
|
||||||
if (fuc->data) {
|
kfree(fuc->data);
|
||||||
kfree(fuc->data);
|
fuc->data = NULL;
|
||||||
fuc->data = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -624,8 +622,7 @@ nvc0_graph_dtor(struct nouveau_object *object)
|
|||||||
{
|
{
|
||||||
struct nvc0_graph_priv *priv = (void *)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->fuc409c);
|
||||||
nvc0_graph_dtor_fw(&priv->fuc409d);
|
nvc0_graph_dtor_fw(&priv->fuc409d);
|
||||||
|
Loading…
Reference in New Issue
Block a user