From patchwork Tue Nov 19 14:11:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 3202361 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9FC0EC045B for ; Tue, 19 Nov 2013 14:12:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88CC220353 for ; Tue, 19 Nov 2013 14:12:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71EEB2034E for ; Tue, 19 Nov 2013 14:12:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752672Ab3KSOMF (ORCPT ); Tue, 19 Nov 2013 09:12:05 -0500 Received: from etezian.org ([198.101.225.253]:58707 "EHLO mail.etezian.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199Ab3KSOMF (ORCPT ); Tue, 19 Nov 2013 09:12:05 -0500 Received: from mail.etezian.org (unknown [131.228.216.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.etezian.org (Postfix) with ESMTPSA id B08DD18358; Tue, 19 Nov 2013 08:15:43 -0600 (CST) From: Andi Shyti To: m.chehab@samsung.com, mkrufky@linuxtv.org, ljalvs@gmail.com, crope@iki.fi Cc: andi@etezian.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: cx24117: use a valid dev pointer for dev_err printout Date: Tue, 19 Nov 2013 15:11:58 +0100 Message-Id: <1384870318-27768-1-git-send-email-andi@etezian.org> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1384868977-24211-1-git-send-email-andi@etezian.org> References: <1384868977-24211-1-git-send-email-andi@etezian.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Don't use '&state->priv->i2c->dev' reference to device because state is still 'NULL'. Use '&i2c->dev' instead. This bug has been reported by scan.coverity.com Signed-off-by: Andi Shyti --- Hi, please apply this patch after my previous patch, forgot to format them together. Thanks, Andi --- drivers/media/dvb-frontends/cx24117.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/cx24117.c b/drivers/media/dvb-frontends/cx24117.c index 07a9894..083830b 100644 --- a/drivers/media/dvb-frontends/cx24117.c +++ b/drivers/media/dvb-frontends/cx24117.c @@ -1166,7 +1166,7 @@ struct dvb_frontend *cx24117_attach(const struct cx24117_config *config, switch (demod) { case 0: - dev_err(&state->priv->i2c->dev, + dev_err(&i2c->dev, "%s: Error attaching frontend %d\n", KBUILD_MODNAME, demod); goto error1;