Subject: [merged] drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch removed from -mm tree To: t.figa@xxxxxxxxxxx,jg1.han@xxxxxxxxxxx,kyungmin.park@xxxxxxxxxxx,sachin.kamat@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx 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 <t.figa@xxxxxxxxxxx> 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 <t.figa@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> Cc: Sachin Kamat <sachin.kamat@xxxxxxxxxx> Reviewed-by: Jingoo Han <jg1.han@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxx are linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html