Re: [PATCH] mac802154: Prevent overwrite return code in mac802154_perform_association()

Miquel Raynal <[email protected]> Tue, 02 Jun 2026 12:35:12 +0200
Newsgroups org.kernel.vger.linux-wpan,dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
Hello,

On 02/06/2026 at 12:41:33 +07, Robertus Diawan Chris <robertusdchris@gmail.=
com> wrote:

> When assoc_status not equal to IEEE802154_ASSOCIATION_SUCCESSFUL, the
> return value assigned to either "-ERANGE" or "-EPERM" but this return
> value will be overwritten to 0 after exiting the conditional scope.
> So, jump to clear_assoc label to preserve the return value when
> assoc_status not equal to IEEE802154_ASSOCIATION_SUCCESSFUL.
>
> This is reported by Coverity Scan as "Unused value".
>
> Fixes: fefd19807fe9 ("mac802154: Handle associating")
> Signed-off-by: Robertus Diawan Chris <[email protected]>

This is correct.

Reviewed-by: Miquel Raynal <[email protected]>

Thanks,
Miqu=C3=A8l