V4L/DVB (6207): pvrusb2: Fix a potential oops in an error leg cleanup
authorMike Isely <isely@pobox.com>
Sun, 9 Sep 2007 01:11:46 +0000 (22:11 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:14:30 +0000 (22:14 -0300)
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-hdw.c

index 2d5be5cfbccfff78d1092431fbdc6d705cef6c9a..5d9045268cf56a47417884d849a559a04f03de9a 100644 (file)
@@ -2172,6 +2172,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);