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] [day] [month] [year] [list]
Message-ID: <1F65A5A7A9494B73A22BDA7D64355767@subhasishg>
Date:	Wed, 27 Apr 2011 12:33:08 +0530
From:	"Subhasish Ghosh" <subhasish@...tralsolutions.com>
To:	"Sergei Shtylyov" <sshtylyov@...sta.com>
Cc:	<davinci-linux-open-source@...ux.davincidsp.com>,
	"Kevin Hilman" <khilman@...com>, <sachi@...tralsolutions.com>,
	"Russell King" <linux@....linux.org.uk>, <nsekhar@...com>,
	"open list" <linux-kernel@...r.kernel.org>, <m-watkins@...com>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 11/11] da850: pruss CAN board specific additions.


>> +static int __init da850_evm_pruss_can_setup(void)
>> +{
>> + int ret, val = 0;
>> + void __iomem *cfg_chip3_reg;
>> +
>> + ret = davinci_cfg_reg_list(da850_evm_pruss_can_pins);
>> + if (ret)
>> + pr_warning("%s: da850_evm_pruss_can_pins mux setup "
>> + "failed:%d\n", __func__, ret);
>
>    Yet you continue to initialize... you should stop here I think.

SG - Ok, will ret error.

>
>> + /* value = 0 to enable the CAN transceiver */
>> + ret = gpio_request_one(DA850_PRUSS_CAN_TRX_PIN,
>> + GPIOF_OUT_INIT_LOW, "pruss_can_en");
>> + if (ret) {
>> + pr_warning("Cannot setup GPIO %d\n", DA850_PRUSS_CAN_TRX_PIN);
>> + gpio_free(DA850_PRUSS_CAN_TRX_PIN);
>
>    Doesn't gpio_request_one() handle freeing GPIO on error?

SG - It does handle error, will remove. But I have another problem,
        Suppose the init failed due to some other reason during probe.
        How can I do a gpio_free, do I need some kind of deinit for the 
setup ?

 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ