From patchwork Fri Jul 23 10:12:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 113864 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6NACxrx006073 for ; Fri, 23 Jul 2010 10:12:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755071Ab0GWKM5 (ORCPT ); Fri, 23 Jul 2010 06:12:57 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:63916 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753563Ab0GWKM4 (ORCPT ); Fri, 23 Jul 2010 06:12:56 -0400 Received: by fxm14 with SMTP id 14so4899757fxm.19 for ; Fri, 23 Jul 2010 03:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=pe1YBcxO3FUA6QYql+QLQHjkCo2c5PTGoSUem9lD114=; b=wBKLfUGQQIww4cEwnSFUM04vHS7rTBEqpnu9hdkFlNcFoAohI4Psdg+ZtXJTKfr7rA kC0OnCfLPwe2vowXzIYVwOupSUTtFwTfeA1FIk7yadcrssGvMz2YYSpaLQyg722Civdx 7+FT2YlO+Bwwx0lUx1cbI9zTg9WH4f0br+ouc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=EVGIrE+/SFgCphlw1LIzc9El+QyCA/mYxIMMTRtF+K0ixSyo9LNr4bP0QNfS1vWKQG gnVPECsZ7V9aYVKDYyG4zgYY1q0k2XNrYLOi11aKS5QssDlfyTjaVdkVXSo9RAkJNCHi 9XMsusLYDocDgGu8qju6Z11eMZgE8ba9kqGNY= Received: by 10.223.124.9 with SMTP id s9mr3030640far.91.1279879973903; Fri, 23 Jul 2010 03:12:53 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id a9sm29318faa.3.2010.07.23.03.12.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Jul 2010 03:12:53 -0700 (PDT) Date: Fri, 23 Jul 2010 12:12:33 +0200 From: Dan Carpenter To: Andy Walls Cc: Mauro Carvalho Chehab , Ian Armstrong , ivtv-devel@ivtvdriver.org, linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -next] V4L: ivtv: remove unneeded NULL checks Message-ID: <20100723101232.GE26313@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 23 Jul 2010 10:13:00 +0000 (UTC) diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index 2c2d862..be03a71 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c @@ -1239,7 +1239,7 @@ static int __init ivtvfb_callback_init(struct device *dev, void *p) struct v4l2_device *v4l2_dev = dev_get_drvdata(dev); struct ivtv *itv = container_of(v4l2_dev, struct ivtv, v4l2_dev); - if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) { + if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { if (ivtvfb_init_card(itv) == 0) { IVTVFB_INFO("Framebuffer registered on %s\n", itv->v4l2_dev.name); @@ -1255,7 +1255,7 @@ static int ivtvfb_callback_cleanup(struct device *dev, void *p) struct ivtv *itv = container_of(v4l2_dev, struct ivtv, v4l2_dev); struct osd_info *oi = itv->osd_info; - if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) { + if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) { IVTVFB_WARN("Framebuffer %d is in use, cannot unload\n", itv->instance);