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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 2015-03-20 um 12:31 schrieb Varka Bhadram:
> On 03/20/2015 04:50 PM, Martin Kepplinger wrote:
>> From: Martin Kepplinger <martin.kepplinger@xxxxxxxxxxxxxxxxxxxxx>
>>
( ...)
>> +    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
> 
>> + 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!


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux