Search Linux Wireless

Re: [bug report] mt76: implement functions to get the response skb for MCU calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 08, 2021 at 05:27:35PM +0300, Dan Carpenter wrote:
> On Fri, Oct 08, 2021 at 04:03:10PM +0200, Johannes Berg wrote:
> > On Fri, 2021-10-08 at 16:00 +0300, Dan Carpenter wrote:
> > > 
> > >     1146         ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD_EFUSE_ACCESS, &req,
> > >     1147                                         sizeof(req), true, &skb);
> > > 
> > > If mt76_mcu_send_and_get_msg() calls the dev->mcu_ops->mcu_send_msg()
> > > then "skb" is not initialized.
> > > 
> > >     1148         if (ret)
> > >     1149                 return ret;
> > >     1150 
> > > --> 1151         res = (struct mt7921_mcu_eeprom_info *)skb->data;
> > 
> > Looks like possibly 'skb' is always initialized if
> > mt76_mcu_send_and_get_msg() returns 0 (success)?
> > 
> 
> This build is with cross function analysis enabled so Smatch looks for
> that.

Btw, it turns out I basically completely disabled the Smatch check for
uninitialized variables a while back.

I've fixed it now so it's warning again, but I'm going through and
manually fixing stuff and adding hack arounds to silence false
positives.  So hopefully, I'll be able to enable it in the published
code soonish.

regards,
dan carpenter




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux