From a25765700945a8212801a2056882447095c31812 Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Sat, 8 Sep 2007 20:11:46 -0500 Subject: pvrusb2: Fix a potential oops in an error leg cleanup From: Mike Isely Signed-off-by: Mike Isely --- linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c') diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 205eab581..32e09df87 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2199,6 +2199,7 @@ static void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) /* Destroy hardware interaction structure */ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) { + if (!hdw) return; pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); if (hdw->fw_buffer) { kfree(hdw->fw_buffer); -- cgit v1.2.3