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: 6688531 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AFF0E9F380 for ; Mon, 29 Jun 2015 12:23:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB916203DA for ; Mon, 29 Jun 2015 12:23:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E3E3203DB for ; Mon, 29 Jun 2015 12:23:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291AbbF2MXm (ORCPT ); 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-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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;