From patchwork Tue Aug 14 07:03:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 1318441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BD71D3FC81 for ; Tue, 14 Aug 2012 07:03:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753403Ab2HNHDt (ORCPT ); Tue, 14 Aug 2012 03:03:49 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:38838 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218Ab2HNHDt (ORCPT ); Tue, 14 Aug 2012 03:03:49 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q7E73heu003597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Aug 2012 07:03:44 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q7E73f2w001380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Aug 2012 07:03:43 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q7E73fFg011410; Tue, 14 Aug 2012 02:03:41 -0500 Received: from elgon.mountain (/41.212.103.53) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Aug 2012 00:03:40 -0700 Date: Tue, 14 Aug 2012 10:03:35 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Ezequiel Garcia , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] stk1160: remove unneeded check Message-ID: <20120814070335.GE4791@elgon.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org "card" is a valid pointer here because we checked snd_card_create() for error returns. Checking after a dereference makes the static checkers complain. Signed-off-by: Dan Carpenter --- Only needed on linux-next. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/stk1160/stk1160-ac97.c b/drivers/media/video/stk1160/stk1160-ac97.c index 8d325f5..c8583c2 100644 --- a/drivers/media/video/stk1160/stk1160-ac97.c +++ b/drivers/media/video/stk1160/stk1160-ac97.c @@ -133,8 +133,7 @@ int stk1160_ac97_register(struct stk1160 *dev) err: dev->snd_card = NULL; - if (card) - snd_card_free(card); + snd_card_free(card); return rc; }