Thread (3 messages) 3 messages, 2 authors, 2015-03-20

Re: [PATCH v4] add support for Freescale's MMA8653FC 10 bit accelerometer

From: Martin Kepplinger <martink@posteo.de>
Date: 2015-03-20 13:43:29
Also in: linux-api, linux-input, lkml

Am 2015-03-20 um 12:31 schrieb Varka Bhadram:
On 03/20/2015 04:50 PM, Martin Kepplinger wrote:
quoted
From: Martin Kepplinger <redacted>
( ...)
quoted
+    return 0;
+
+ err_free_irq:
+    if (mma->irq)
+        free_irq(mma->irq, mma);
+ err_free_mem:
+    kfree(mma);
If we use devm_* API's above steps are not required
quoted
+ err_out:
+    return err;
+}
+
+static int mma8653fc_remove(struct i2c_client *client)
+{
+    struct mma8653fc *mma = i2c_get_clientdata(client);
+
+    free_irq(mma->irq, mma);
+    dev_dbg(&client->dev, "unregistered accelerometer\n");
+    kfree(mma);
same as above..
thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help