On Tue, 05 Apr 2016, Laxman Dewangan wrote:
+ if (!ret) {
+ *ptr = dev;
+ devres_add(dev, ptr);
+ } else {
+ devres_free(ptr);
+ }
Switch these round. If you encounter a problem, free and return. If
not, skip the error handling and add the device outside of the if().
Wanted to say+ * Remove all mfd devices added on the device.s/mfd/MFD/
'D' already means devices, so here you are saying "devices devices".
Please re-word. Besides, you need to be more specific as to which
"devices on the devices" you are detailing, since this sentence
doesn't really make a great deal of sense.
+ * Normally this function will not need to be called and the resourceThen what is the purpose of providing it? Do you have a user?
+ * management code will ensure that the resource is freed.