Loading net/irda/af_irda.c +12 −36 Original line number Diff line number Diff line Loading @@ -1901,16 +1901,10 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, optlen)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, optlen); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading @@ -2032,16 +2026,10 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, optlen)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, optlen); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading @@ -2317,16 +2305,10 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, len)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, len); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading @@ -2381,16 +2363,10 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, len)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, len); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading
net/irda/af_irda.c +12 −36 Original line number Diff line number Diff line Loading @@ -1901,16 +1901,10 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, optlen)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, optlen); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading @@ -2032,16 +2026,10 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, optlen)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, optlen); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading @@ -2317,16 +2305,10 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, len)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, len); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading Loading @@ -2381,16 +2363,10 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, goto out; } ias_opt = kmalloc(sizeof(struct irda_ias_set), GFP_ATOMIC); if (ias_opt == NULL) { err = -ENOMEM; goto out; } /* Copy query to the driver. */ if (copy_from_user(ias_opt, optval, len)) { kfree(ias_opt); err = -EFAULT; ias_opt = memdup_user(optval, len); if (IS_ERR(ias_opt)) { err = PTR_ERR(ias_opt); goto out; } Loading