From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [patch] mfd: pm8921: potential NULL dereference in pm8921_remove() Date: Thu, 7 Nov 2013 10:06:09 +0000 Message-ID: <20131107100609.GL30901@lee--X1> References: <20131107080420.GP21844@elgon.mountain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-pa0-f50.google.com ([209.85.220.50]:33163 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981Ab3KGKGQ (ORCPT ); Thu, 7 Nov 2013 05:06:16 -0500 Received: by mail-pa0-f50.google.com with SMTP id fb1so379700pad.37 for ; Thu, 07 Nov 2013 02:06:15 -0800 (PST) Content-Disposition: inline In-Reply-To: <20131107080420.GP21844@elgon.mountain> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Dan Carpenter Cc: David Brown , Abhijeet Dharmapurikar , Daniel Walker , Bryan Huntsman , Samuel Ortiz , linux-arm-msm@vger.kernel.org, kernel-janitors@vger.kernel.org Just a thought. If you use `git format-patch` you don't have to hand-craft the [PATCH] part of the subject line. > We assume that "pmic" could be NULL and then dereference it two lines > later. I fix this by moving the dereference inside the NULL check. >=20 > Fixes: c013f0a56c56 ('mfd: Add pm8xxx irq support') > Signed-off-by: Dan Carpenter Patch applied thanks. --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog