Re: [PATCH] hwmon: (iio_hwmon) Fix missing iio_channel_release_all call if devm_kzalloc fail

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

 



On 04/23/2013 01:48 PM, Guenter Roeck wrote:
> On Tue, Apr 23, 2013 at 05:06:43PM +0800, Axel Lin wrote:
>> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> Good catch.
>
> Acked-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Given the timing this will need to go in through hwmon
after the merge window is closed.  Sorry, busy week or
I would have caught up with this earlier.

Acked-by: Jonathan Cameron <jic23@xxxxxxxxxx>
>
>> ---
>>  drivers/hwmon/iio_hwmon.c |    6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c
>> index aafa453..368497f 100644
>> --- a/drivers/hwmon/iio_hwmon.c
>> +++ b/drivers/hwmon/iio_hwmon.c
>> @@ -84,8 +84,10 @@ static int iio_hwmon_probe(struct platform_device *pdev)
>>  		return PTR_ERR(channels);
>>  
>>  	st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL);
>> -	if (st == NULL)
>> -		return -ENOMEM;
>> +	if (st == NULL) {
>> +		ret = -ENOMEM;
>> +		goto error_release_channels;
>> +	}
>>  
>>  	st->channels = channels;
>>  
>> -- 
>> 1.7.10.4
>>
>>
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux