Re: [PATCH v2] net: wireless: fix uninitialized pointers with free attribute

From: Dan Carpenter
Date: Tue Nov 18 2025 - 01:50:03 EST


On Mon, Nov 10, 2025 at 01:17:10PM +0000, Korenblit, Miriam Rachel wrote:
> > Subject: [PATCH v2] net: wireless: fix uninitialized pointers with free attribute
>
> Please send iwlwifi patches to either iwlwifi-next or iwlwifi-fixes ([PATCH iwlwifi-next] wifi: iwlwifi: blah blah )
> In your case it is not really fixing any bug, since we never return from the functions without initializing the pointers.

I'm not a fan of these subsystem rules. If you're working over the entire
kernel then you would have to track over 400 different trees. This could
easily be done in the one place on the recieving end in the QC process
instead of forcing every contributor to write little shell scripts.

Anyway here is the code how I handle that for netdev. For BPF, which is the
only other subsystem with this rule, I only send bug reports instead of
patches because I really want to discourage this kind of rule...

git remote update net
git remote update net-next

if grep -q netdev $MAIL_FILE && ! grep -q wireless $MAIL_FILE ; then
if [ "$FIXES_COMMIT" != "" ] ; then
if git merge-base --is-ancestor $FIXES_COMMIT net/main ; then
TREE="net"
elif git merge-base --is-ancestor $FIXES_COMMIT net-next/main ; then
TREE="net-next"
else
TREE="net-other"
fi
else
TREE="net-next"
fi
fi

So the new iwlwifi code would be (free handed in my email client).
First add iwlwifi as a remote to your developement tree.

git remote add iwlwifi https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git

git remote update iwlwifi

if grep -q -w /iwlwifi/ $MAIL_FILE ; then
if [ "$FIXES_COMMIT" != "" ] ; then
if git merge-base --is-ancestor $FIXES_COMMIT iwlwifi/fixes ; then
TREE="iwlwifi"
elif git merge-base --is-ancestor $FIXES_COMMIT iwlwifi/next ; then
TREE="iwlwifi-next"
else
TREE="iwlwifi-other"
fi
else
TREE="iwlwifi-next"
fi
fi

regards,
dan carpenter