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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 1 Feb 2022 12:36:43 -0800
From:   Luiz Augusto von Dentz <luiz.dentz@...il.com>
To:     Marcel Holtmann <marcel@...tmann.org>
Cc:     cgel.zte@...il.com, Johan Hedberg <johan.hedberg@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-bluetooth <linux-bluetooth@...r.kernel.org>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] net/bluetooth: remove unneeded err variable

Hi,

On Wed, Jan 19, 2022 at 11:34 AM Marcel Holtmann <marcel@...tmann.org> wrote:
>
> Hi Minghao,
>
> > Return value from mgmt_cmd_complete() directly instead
> > of taking this in another redundant variable.
>
> the Bluetooth subsystem uses Bluetooth: as subject prefix.
>
> > Reported-by: Zeal Robot <zealci@....com.cn>
> > Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> > Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
> > ---
> > net/bluetooth/mgmt.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> > index 37087cf7dc5a..d0804648da32 100644
> > --- a/net/bluetooth/mgmt.c
> > +++ b/net/bluetooth/mgmt.c
> > @@ -8601,7 +8601,6 @@ static int get_adv_size_info(struct sock *sk, struct hci_dev *hdev,
> >       struct mgmt_cp_get_adv_size_info *cp = data;
> >       struct mgmt_rp_get_adv_size_info rp;
> >       u32 flags, supported_flags;
> > -     int err;
> >
> >       bt_dev_dbg(hdev, "sock %p", sk);
> >
> > @@ -8628,10 +8627,8 @@ static int get_adv_size_info(struct sock *sk, struct hci_dev *hdev,
> >       rp.max_adv_data_len = tlv_data_max_len(hdev, flags, true);
> >       rp.max_scan_rsp_len = tlv_data_max_len(hdev, flags, false);
> >
> > -     err = mgmt_cmd_complete(sk, hdev->id, MGMT_OP_GET_ADV_SIZE_INFO,
> > +     return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_GET_ADV_SIZE_INFO,
> >                               MGMT_STATUS_SUCCESS, &rp, sizeof(rp));
> > -
> > -     return err;
> > }
>
> You also have a coding style error here in your indentation.
>
> Regards
>
> Marcel

Applied, after fixing the coding style and commit message, thanks.

-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ