From patchwork Wed Feb 9 15:06:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo von Holtz X-Patchwork-Id: 544351 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p19FNFkI005335 for ; Wed, 9 Feb 2011 15:23:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751040Ab1BIPXO (ORCPT ); Wed, 9 Feb 2011 10:23:14 -0500 Received: from miraculix-out.informatik.uni-kiel.de ([134.245.248.209]:47143 "EHLO miraculix.informatik.uni-kiel.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750997Ab1BIPXN (ORCPT ); Wed, 9 Feb 2011 10:23:13 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 09 Feb 2011 15:23:21 +0000 (UTC) X-Greylist: delayed 991 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Feb 2011 10:23:13 EST X-Virus-Scanned: amavisd-new at informatik.uni-kiel.de Received: from localhost (96-159-103-86.dynamic.dsl.tng.de [86.103.159.96]) (authenticated bits=0) by miraculix.informatik.uni-kiel.de (8.14.4/8.14.4) with ESMTP id p19F6TEU029409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 9 Feb 2011 16:06:34 +0100 (MET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=informatik.uni-kiel.de; s=ifi-200807; t=1297263995; bh=TThfUWygnVYcFlJTxxQIZVuV/10ktQyeFdtrwEvTKjY=; h=From:To:Cc:Subject:Date:Message-Id; b=dNcdqMbvZSkeDJtMqvBLk3wWfXmfsfrojnKKC0rP9vxChmycr+bmgBb43HdA3F8V1 KcIa8HJCT9PUW8SzqJXDQdDmzvWxuE7Ij9Oih0pSqaLI0DyXRrKiVMijmxiYW3djmf yosd/8Be6RumUuooQpshfOsx46c7fHR0ae80jIeI= From: Timo von Holtz To: gregkh@suse.de Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Timo von Holtz Subject: [PATCH] Staging: cx25821: removed unnecessary NULL-Pointer-checks Date: Wed, 9 Feb 2011 16:06:26 +0100 Message-Id: <1297263986-3073-1-git-send-email-tvh@informatik.uni-kiel.de> X-Mailer: git-send-email 1.7.4 X-Null-Tag: f6d9ac22c5a91b0604b3fb8ef22011a4 X-Authenticated-Sender: user tvh from 86.103.159.96 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c index 7992a3b..0f9ca77 100644 --- a/drivers/staging/cx25821/cx25821-audio-upstream.c +++ b/drivers/staging/cx25821/cx25821-audio-upstream.c @@ -244,13 +244,10 @@ void cx25821_stop_upstream_audio(struct cx25821_dev *dev) dev->_audioframe_count = 0; dev->_audiofile_status = END_OF_FILE; - if (dev->_irq_audio_queues) { - kfree(dev->_irq_audio_queues); - dev->_irq_audio_queues = NULL; - } + kfree(dev->_irq_audio_queues); + dev->_irq_audio_queues = NULL; - if (dev->_audiofilename != NULL) - kfree(dev->_audiofilename); + kfree(dev->_audiofilename); } void cx25821_free_mem_upstream_audio(struct cx25821_dev *dev) diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c index e2efacd..655357d 100644 --- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c +++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c @@ -234,13 +234,10 @@ void cx25821_stop_upstream_video_ch2(struct cx25821_dev *dev) dev->_frame_count_ch2 = 0; dev->_file_status_ch2 = END_OF_FILE; - if (dev->_irq_queues_ch2) { - kfree(dev->_irq_queues_ch2); - dev->_irq_queues_ch2 = NULL; - } + kfree(dev->_irq_queues_ch2); + dev->_irq_queues_ch2 = NULL; - if (dev->_filename_ch2 != NULL) - kfree(dev->_filename_ch2); + kfree(dev->_filename_ch2); tmp = cx_read(VID_CH_MODE_SEL); cx_write(VID_CH_MODE_SEL, tmp & 0xFFFFFE00); diff --git a/drivers/staging/cx25821/cx25821-video-upstream.c b/drivers/staging/cx25821/cx25821-video-upstream.c index 31b4e3c..eb0172b 100644 --- a/drivers/staging/cx25821/cx25821-video-upstream.c +++ b/drivers/staging/cx25821/cx25821-video-upstream.c @@ -279,13 +279,10 @@ void cx25821_stop_upstream_video_ch1(struct cx25821_dev *dev) dev->_frame_count = 0; dev->_file_status = END_OF_FILE; - if (dev->_irq_queues) { - kfree(dev->_irq_queues); - dev->_irq_queues = NULL; - } + kfree(dev->_irq_queues); + dev->_irq_queues = NULL; - if (dev->_filename != NULL) - kfree(dev->_filename); + kfree(dev->_filename); tmp = cx_read(VID_CH_MODE_SEL); cx_write(VID_CH_MODE_SEL, tmp & 0xFFFFFE00);