Skip to contentSkip to conversation

video: pvrusb2-hdw kfree cleanup

PATCH In review Mariusz Kozlowski 2 participants 3 messages Jan 2, 2007 – Jan 3, 2007 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: pvrusb2-hdw kfree cleanup

Hello,

This patch removes redundant argument check for kfree().

 drivers/media/video/pvrusb2/pvrusb2-hdw.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/media/video/pvrusb2/pvrusb2-hdw.c +8 -8
diff -upr linux-2.6.20-rc2-mm1-a/drivers/media/video/pvrusb2/pvrusb2-hdw.c linux-2.6.20-rc2-mm1-b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1926,10 +1926,10 @@ struct pvr2_hdw *pvr2_hdw_create(struct 
 	if (hdw) {
 		usb_free_urb(hdw->ctl_read_urb);
 		usb_free_urb(hdw->ctl_write_urb);
-		if (hdw->ctl_read_buffer) kfree(hdw->ctl_read_buffer);
-		if (hdw->ctl_write_buffer) kfree(hdw->ctl_write_buffer);
-		if (hdw->controls) kfree(hdw->controls);
-		if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info);
+		kfree(hdw->ctl_read_buffer);
+		kfree(hdw->ctl_write_buffer);
+		kfree(hdw->controls);
+		kfree(hdw->mpeg_ctrl_info);
 		kfree(hdw);
 	}
 	return NULL;
@@ -1994,10 +1994,10 @@ void pvr2_hdw_destroy(struct pvr2_hdw *h
 			unit_pointers[hdw->unit_number] = NULL;
 		}
 	} while (0); up(&pvr2_unit_sem);
-	if (hdw->controls) kfree(hdw->controls);
-	if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info);
-	if (hdw->std_defs) kfree(hdw->std_defs);
-	if (hdw->std_enum_names) kfree(hdw->std_enum_names);
+	kfree(hdw->controls);
+	kfree(hdw->mpeg_ctrl_info);
+	kfree(hdw->std_defs);
+	kfree(hdw->std_enum_names);
 	kfree(hdw);
 }
 
Signature · 3 lines
Regards,

	Mariusz Kozlowski
#1 lore raw

Hello,

Quoted 4 lines

This patch removes redundant argument check for kfree().

 drivers/media/video/pvrusb2/pvrusb2-hdw.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Signature · 3 lines
Regards,

	Mariusz Kozlowski
#2 lore raw
Quoted 10 lines · Mariusz Kozlowski

Hello,

Quoted 4 lines

This patch removes redundant argument check for kfree().

 drivers/media/video/pvrusb2/pvrusb2-hdw.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

-Mike

Signature · 4 lines
                        |         Mike Isely          |     PGP fingerprint
     Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                        |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                        |                             |