From patchwork Wed Sep 30 15:11:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 50714 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8UFClQe020597 for ; Wed, 30 Sep 2009 15:12:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754689AbZI3PLa (ORCPT ); Wed, 30 Sep 2009 11:11:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754675AbZI3PLa (ORCPT ); Wed, 30 Sep 2009 11:11:30 -0400 Received: from smtp.nokia.com ([192.100.105.134]:52037 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754585AbZI3PL3 (ORCPT ); Wed, 30 Sep 2009 11:11:29 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n8UFAKUn027452; Wed, 30 Sep 2009 10:10:36 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Sep 2009 18:11:26 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Sep 2009 18:11:24 +0300 Received: from localhost.localdomain (tumpelo.ntc.nokia.com [172.22.144.93]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n8UFBGl2016767; Wed, 30 Sep 2009 18:11:16 +0300 From: Ilkka Koskinen To: linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: linux-omap@vger.kernel.org, ilkka.koskinen@nokia.com Subject: [PATCH 1/2] twl4030: Do not dereference null pointer in error path Date: Wed, 30 Sep 2009 18:11:54 +0300 Message-Id: <1254323515-30866-1-git-send-email-ilkka.koskinen@nokia.com> X-Mailer: git-send-email 1.6.0.4 X-OriginalArrivalTime: 30 Sep 2009 15:11:24.0839 (UTC) FILETIME=[46B77B70:01CA41E0] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index e424cf6..8cf0a02 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c @@ -792,7 +792,7 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id) twl->client = i2c_new_dummy(client->adapter, twl->address); if (!twl->client) { - dev_err(&twl->client->dev, + dev_err(&client->dev, "can't attach client %d\n", i); status = -ENOMEM; goto fail;