+ drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch added to -mm tree
Subject: + drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 23 May 2013 16:55:13 -0700
The patch titled
Subject: drivers/rtc/rtc-max8998.c: check for pdata presence before dereferencing
has been added to the -mm tree. Its filename is
drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Tomasz Figa <[email protected]>
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.
---
drivers/rtc/rtc-max8998.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-max8998.c renamed from drivers/rtc/rtc-max8998.c~drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing +1 -1
@@ -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 [email protected] are
linux-next.patch drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch