From patchwork Thu Aug 19 09:50:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 120325 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 o7J9oU2N005859 for ; Thu, 19 Aug 2010 09:50:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160Ab0HSJu2 (ORCPT ); Thu, 19 Aug 2010 05:50:28 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:42261 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133Ab0HSJu0 (ORCPT ); Thu, 19 Aug 2010 05:50:26 -0400 Received: by wwi17 with SMTP id 17so2216116wwi.1 for ; Thu, 19 Aug 2010 02:50:25 -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=NR9F62D9GwY2ImZ9O0zQDXjUEAFsF26KqEGHQpjwx7E=; b=K0Yi3gkfAw+T2GHVhAdIMMes3pFMdHJ6oWcqKteD0MCsc4w5VQ/WSi+laxCk83MX2f QkS3wzS8ntKTjwRwi6XCN4YdApyiPQKhEun46anP8DpJ0emmSQ0LyNbbGa2/GEM5oxkl TCbAv3zy6QzUdAW38wWyKU41QmV+jz5iB//zU= 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=Ggn6rraF/eJd0YkmCv0Ax8lYMYatxq9Df8kAvCLpcP9AECd+Skfty0CMw2gpOmhMP5 18UIJNpKDx8ep5gj6AVwXfkQ8bz0WZtR64c6qy/jmGp95qJVLnIAH4zTr5ixtgXZwF1O KW8X8ieoTzO4neLsLcEwd0VIufUMq0YwiO+LE= Received: by 10.227.138.6 with SMTP id y6mr8079515wbt.162.1282211425154; Thu, 19 Aug 2010 02:50:25 -0700 (PDT) Received: from bicker ([41.205.146.22]) by mx.google.com with ESMTPS id b23sm860885wbb.10.2010.08.19.02.50.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Aug 2010 02:50:23 -0700 (PDT) Date: Thu, 19 Aug 2010 11:50:04 +0200 From: Dan Carpenter To: Mike Isely Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] V4L/DVB: pvrusb2: remove unneeded NULL checks Message-ID: <20100819095004.GN645@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]); Thu, 19 Aug 2010 09:50:30 +0000 (UTC) diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 1b992b8..55ea914 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -513,7 +513,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, if (ret >= 0) { ret = pvr2_ctrl_range_check(cptr,*valptr); } - if (maskptr) *maskptr = ~0; + *maskptr = ~0; } else if (cptr->info->type == pvr2_ctl_bool) { ret = parse_token(ptr,len,valptr,boolNames, ARRAY_SIZE(boolNames)); @@ -522,7 +522,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, } else if (ret == 0) { *valptr = (*valptr & 1) ? !0 : 0; } - if (maskptr) *maskptr = 1; + *maskptr = 1; } else if (cptr->info->type == pvr2_ctl_enum) { ret = parse_token( ptr,len,valptr, @@ -531,7 +531,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, if (ret >= 0) { ret = pvr2_ctrl_range_check(cptr,*valptr); } - if (maskptr) *maskptr = ~0; + *maskptr = ~0; } else if (cptr->info->type == pvr2_ctl_bitmask) { ret = parse_tlist( ptr,len,maskptr,valptr,