lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9628edde-5270-d5a5-7db6-c9ec3f47c742@st.com>
Date:   Fri, 3 May 2019 12:38:18 +0000
From:   Fabien DESSENNE <fabien.dessenne@...com>
To:     Jiri Kosina <jikos@...nel.org>
CC:     Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] HID: rmi: fix devm_add_action_or_reset() parameter


On 03/05/2019 2:19 PM, Jiri Kosina wrote:
> On Fri, 12 Apr 2019, Fabien Dessenne wrote:
>
>> The second parameter of devm_add_action_or_reset() shall be a function,
>> not a function address.
>>
>> Signed-off-by: Fabien Dessenne <fabien.dessenne@...com>
>> ---
>>   drivers/hid/hid-rmi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
>> index 9e33165..8748d4d 100644
>> --- a/drivers/hid/hid-rmi.c
>> +++ b/drivers/hid/hid-rmi.c
>> @@ -623,7 +623,7 @@ static int rmi_setup_irq_domain(struct hid_device *hdev)
>>   	if (!hdata->domain)
>>   		return -ENOMEM;
>>   
>> -	ret = devm_add_action_or_reset(&hdev->dev, &rmi_irq_teardown, hdata);
>> +	ret = devm_add_action_or_reset(&hdev->dev, rmi_irq_teardown, hdata);
> Why do you think this is wrong C?


Because I was not aware that both func and &func refer to the same 
function pointer.

Now I know :)


>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ