Hi Amitoj,
On Sun, Jul 31, 2016 at 09:28:00AM +0530, Amitoj Kaur Chawla wrote:
> devm_gpiod_get returns an ERR_PTR on error so a null check is
> incorrect and an IS_ERR check is required.
>
> The Coccinelle semantic patch used to make this change is as follows:
> @@
> expression e;
> statement
Hi Amitoj,
On Sun, Jul 31, 2016 at 09:28:00AM +0530, Amitoj Kaur Chawla wrote:
> devm_gpiod_get returns an ERR_PTR on error so a null check is
> incorrect and an IS_ERR check is required.
>
> The Coccinelle semantic patch used to make this change is as follows:
> @@
> expression e;
> statement
devm_gpiod_get returns an ERR_PTR on error so a null check is
incorrect and an IS_ERR check is required.
The Coccinelle semantic patch used to make this change is as follows:
@@
expression e;
statement S;
@@
e = devm_gpiod_get(...);
if(
- !e
+ IS_ERR(e)
)
{
...
- return ...;
+
devm_gpiod_get returns an ERR_PTR on error so a null check is
incorrect and an IS_ERR check is required.
The Coccinelle semantic patch used to make this change is as follows:
@@
expression e;
statement S;
@@
e = devm_gpiod_get(...);
if(
- !e
+ IS_ERR(e)
)
{
...
- return ...;
+
4 matches
Mail list logo