mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
staging: comedi: ni_tio: make ni_gpct_device_destroy() NULL pointer safe
Modify the pointer check to make this function NULL pointer safe. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2460e3cd9f
commit
bed05b6c34
1 changed files with 1 additions and 1 deletions
|
|
@ -1413,7 +1413,7 @@ EXPORT_SYMBOL_GPL(ni_gpct_device_construct);
|
|||
|
||||
void ni_gpct_device_destroy(struct ni_gpct_device *counter_dev)
|
||||
{
|
||||
if (!counter_dev->counters)
|
||||
if (!counter_dev)
|
||||
return;
|
||||
kfree(counter_dev->counters);
|
||||
kfree(counter_dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue