From: Bart Massey Date: Mon, 21 Sep 2009 18:38:07 +0000 (-0700) Subject: Staging: comedi: ni_labpc_cs: removed null check from kfree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92c4bad75cef701af881c8caffa1b02f7891a295;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Staging: comedi: ni_labpc_cs: removed null check from kfree Signed-off-by: Bart Massey Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index bf6ce0284af3..300ecb2ac9ec 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c @@ -272,9 +272,8 @@ static void labpc_cs_detach(struct pcmcia_device *link) labpc_release(link); } - /* This points to the parent local_info_t struct */ - if (link->priv) - kfree(link->priv); + /* This points to the parent local_info_t struct (may be null) */ + kfree(link->priv); } /* labpc_cs_detach */