Re: [PATCH] treewide: remove redundent IS_ERR() before error code check

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

 



pon., 6 sty 2020 o 06:00 Masahiro Yamada <masahiroy@xxxxxxxxxx> napisał(a):
>
> 'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p).
> Hence, IS_ERR(p) is unneeded.
>
> The semantic patch that generates this commit is as follows:
>
> // <smpl>
> @@
> expression ptr;
> constant error_code;
> @@
> -IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code)
> +PTR_ERR(ptr) == - error_code
> // </smpl>
>
> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>

For GPIO:

Acked-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux