From: akpm@linux-foundation.org Subject: [merged] drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch removed from -mm tree Date: Tue, 28 May 2013 12:37:21 -0700 Message-ID: <51a50771.Mi9k0IG/HNXBNxiL%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60476 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755144Ab3E1ThW (ORCPT ); Tue, 28 May 2013 15:37:22 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, sachin.kamat@linaro.org, kyungmin.park@samsung.com, jg1.han@samsung.com, t.figa@samsung.com Subject: [merged] drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch removed from -mm tree To: t.figa@samsung.com,jg1.han@samsung.com,kyungmin.park@samsung.com,sachin.kamat@linaro.org,mm-commits@vger.kernel.org From: akpm@linux-foundation.org Date: Tue, 28 May 2013 12:37:21 -0700 The patch titled Subject: drivers/rtc/rtc-max8998.c: check for pdata presence before dereferencing has been removed from the -mm tree. Its filename was drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Tomasz Figa Subject: drivers/rtc/rtc-max8998.c: check for pdata presence before dereferencing Currently the driver can crash with a NULL pointer dereference if no pdata is provided, despite of successful registration of the MFD part. This patch fixes the problem by adding a NULL check before dereferencing the pdata pointer. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park Cc: Sachin Kamat Reviewed-by: Jingoo Han Signed-off-by: Andrew Morton --- drivers/rtc/rtc-max8998.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/rtc/rtc-max8998.c~drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing drivers/rtc/rtc-max8998.c --- a/drivers/rtc/rtc-max8998.c~drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing +++ a/drivers/rtc/rtc-max8998.c @@ -285,7 +285,7 @@ static int max8998_rtc_probe(struct plat info->irq, ret); dev_info(&pdev->dev, "RTC CHIP NAME: %s\n", pdev->id_entry->name); - if (pdata->rtc_delay) { + if (pdata && pdata->rtc_delay) { info->lp3974_bug_workaround = true; dev_warn(&pdev->dev, "LP3974 with RTC REGERR option." " RTC updates will be extremely slow.\n"); _ Patches currently in -mm which might be from t.figa@samsung.com are linux-next.patch