Ahmed S. Darwish wrote:
> Remove unnecessary kmalloc casts in drivers/char/tty_io.c
>
> Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]>

>       if (!*ltp_loc) {
> -             ltp = (struct ktermios *) kmalloc(sizeof(struct ktermios),
> -                                              GFP_KERNEL);
> +             ltp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
                      ^^^^^^^
>               if (!ltp)
>                       goto free_mem_out;
>               memset(ltp, 0, sizeof(struct ktermios));
                ^^^^^^

kzalloc

>               if (!*o_ltp_loc) {
> -                     o_ltp = (struct ktermios *)
> -                             kmalloc(sizeof(struct ktermios), GFP_KERNEL);
> +                     o_ltp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
                                ^^^^^^^
>                       if (!o_ltp)
>                               goto free_mem_out;
>                       memset(o_ltp, 0, sizeof(struct ktermios));
                        ^^^^^^

kzalloc

HTH

Eike

Attachment: pgpMg2RKSFpk8.pgp
Description: PGP signature

Reply via email to