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

From: Martin Kepplinger
Date: Fri Mar 20 2015 - 09:43:32 EST


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 linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/