提交 5e2c217e 编写于 作者: F Figo.zhang 提交者: Mauro Carvalho Chehab

V4L/DVB (11958): usbvision-core.c: vfree does its own NULL check

vfree() does it's own NULL checking,so no need for check before
calling it.
Signed-off-by: NFigo.zhang <figo1802@gmail.com>
Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 f1ca0adf
...@@ -390,10 +390,9 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision) ...@@ -390,10 +390,9 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
void usbvision_scratch_free(struct usb_usbvision *usbvision) void usbvision_scratch_free(struct usb_usbvision *usbvision)
{ {
if (usbvision->scratch != NULL) { vfree(usbvision->scratch);
vfree(usbvision->scratch); usbvision->scratch = NULL;
usbvision->scratch = NULL;
}
} }
/* /*
...@@ -506,10 +505,9 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision) ...@@ -506,10 +505,9 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
*/ */
void usbvision_decompress_free(struct usb_usbvision *usbvision) void usbvision_decompress_free(struct usb_usbvision *usbvision)
{ {
if (usbvision->IntraFrameBuffer != NULL) { vfree(usbvision->IntraFrameBuffer);
vfree(usbvision->IntraFrameBuffer); usbvision->IntraFrameBuffer = NULL;
usbvision->IntraFrameBuffer = NULL;
}
} }
/************************************************************ /************************************************************
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册