From patchwork Mon Jun 29 12:23:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 30426 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1Z9Y6H-0006YL-3H; Mon, 29 Jun 2015 14:23:49 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-7) with esmtp id 1Z9Y6E-0002DS-2O; Mon, 29 Jun 2015 14:23:48 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291AbbF2MXm (ORCPT + 1 other); Mon, 29 Jun 2015 08:23:42 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:58776 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752628AbbF2MXl (ORCPT ); Mon, 29 Jun 2015 08:23:41 -0400 Received: from ayla.of.borg ([84.193.93.87]) by xavier.telenet-ops.be with bizsmtp id mCPg1q0011t5w8s01CPgxy; Mon, 29 Jun 2015 14:23:40 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1Z9Y67-0002JJ-Pa; Mon, 29 Jun 2015 14:23:39 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1Z9Y6B-0005e6-61; Mon, 29 Jun 2015 14:23:43 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] [media] mt9v032: Add missing initialization of pdata in mt9v032_get_pdata() Date: Mon, 29 Jun 2015 14:23:41 +0200 Message-Id: <1435580621-21663-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.6.29.121817 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, NO_URI_HTTPS 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS ' drivers/media/i2c/mt9v032.c: In function ‘mt9v032_get_pdata’: drivers/media/i2c/mt9v032.c:885: warning: ‘pdata’ may be used uninitialized in this function If parsing the endpoint node properties fails, mt9v032_get_pdata() will return an uninitialized pointer value. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart --- drivers/media/i2c/mt9v032.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c index 977f4006edbd496d..a68ce94ee097604a 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -882,7 +882,7 @@ static const struct regmap_config mt9v032_regmap_config = { static struct mt9v032_platform_data * mt9v032_get_pdata(struct i2c_client *client) { - struct mt9v032_platform_data *pdata; + struct mt9v032_platform_data *pdata = NULL; struct v4l2_of_endpoint endpoint; struct device_node *np; struct property *prop;