Thread (15 messages) 15 messages, 2 authors, 2015-08-10

Re: [PATCH v2] crypto: talitos: Prevent panic in probe error path

From: Aaron Sierra <hidden>
Date: 2015-08-06 18:46:50

For completeness, this patch also sets device drvdata to NULL after
the private structure is freed in talitos_remove().
[snip]
quoted hunk ↗ jump to hunk
@@ -2745,6 +2754,7 @@ static int talitos_remove(struct platform_device
*ofdev)
 	iounmap(priv->reg);
 
 	kfree(priv);
+	dev_set_drvdata(dev, NULL);
 
 	return 0;
 }
I just found this drvdata cleanup hasn't been required for a few years,
due to the following commit:

    commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    Author: Hans de Goede [off-list ref]
    Date:   Wed May 23 00:09:34 2012 +0200

        device-core: Ensure drvdata = NULL when no driver is bound

Should I submit a v3 patch without this cleanup, assuming there aren't
other changes requested?

-Aaron
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help