mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
To: isely@pobox.com
Cc: pvrusb2@isely.net, video4linux-list@redhat.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH] video: pvrusb2-hdw kfree cleanup
Date: Tue, 2 Jan 2007 12:44:21 +0100	[thread overview]
Message-ID: <200701021244.21728.m.kozlowski@tuxland.pl> (raw)

Hello,

	This patch removes redundant argument check for kfree().

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

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
--- linux-2.6.20-rc2-mm1-a/drivers/media/video/pvrusb2/pvrusb2-hdw.c	2006-12-28 12:57:37.000000000 +0100
+++ linux-2.6.20-rc2-mm1-b/drivers/media/video/pvrusb2/pvrusb2-hdw.c	2007-01-02 01:48:31.000000000 +0100
@@ -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);
 }
 


-- 
Regards,

	Mariusz Kozlowski

             reply	other threads:[~2007-01-02 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-02 11:44 Mariusz Kozlowski [this message]
2007-01-02 12:26 ` Mariusz Kozlowski
2007-01-03  2:57   ` Mike Isely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701021244.21728.m.kozlowski@tuxland.pl \
    --to=m.kozlowski@tuxland.pl \
    --cc=isely@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pvrusb2@isely.net \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®