Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752240AbbFIN4M (ORCPT ); Tue, 9 Jun 2015 09:56:12 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:34142 "EHLO opensource.wolfsonmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753066AbbFIN4I (ORCPT ); Tue, 9 Jun 2015 09:56:08 -0400 Date: Tue, 9 Jun 2015 14:56:06 +0100 From: Charles Keepax To: Inha Song Cc: broonie@kernel.org, lee.jones@linaro.org, alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, sameo@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH] mfd: wm8994: Fix NULL pointer exception on missing pdata Message-ID: <20150609135606.GF32730@opensource.wolfsonmicro.com> References: <1433845112-371-1-git-send-email-ideal.song@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433845112-371-1-git-send-email-ideal.song@samsung.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 24 On Tue, Jun 09, 2015 at 07:18:32PM +0900, Inha Song wrote: > If we use the dev_get_platdata, pdata can be NULL in DT environments. > Actually, NULL pointer exception is occurs with error messages like this: > > [ 1.226583] Unable to handle kernel NULL pointer dereference at virtual address 00000044 > [ 1.467910] [] (wm8994_irq_init) from [] (wm8994_i2c_probe+0x684/0x858) > [ 1.476241] [] (wm8994_i2c_probe) from [] (i2c_device_probe+0x11c/0x17c) > > In wm8994-core, we already checked wheter platform data is NULL and set the > wm8994->pdata to platform data if platform data is not NULL. > So, we can use wm8994->pdata instead of platform data. > > Signed-off-by: Inha Song > --- Acked-by: Charles Keepax Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/