]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (5743): Tuner: clean up kfree() after release
authorMichael Krufky <mkrufky@linuxtv.org>
Mon, 4 Jun 2007 19:00:45 +0000 (16:00 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 18 Jul 2007 17:23:56 +0000 (14:23 -0300)
commit45a939614b95c0765039ae6d6ebcb8c17734ee5a
treefb43a6c5a0cde3e4b72e8bbf385b510409a161a9
parent2ff1b48570d29b77041025e2d1b9a97636defe1e
V4L/DVB (5743): Tuner: clean up kfree() after release

Although it is safe to kfree(NULL), We only need to kfree(priv)
if the release callback is undefined.  As it stands now, there
is some redundancy in the operation of releasing the priv data
structures. This patch will call kfree(priv) and set priv to NULL,
if the release callback isnt defined.  Otherwise, let the release
callback handle this itself.
Thanks to Mauro Carvalho Chehab for suggesting this.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tuner-core.c