[PATCH] ath10k: remove NULL ptr deref in variable init of ath10k_monitor_vdev_start

Kalle Valo kvalo at qca.qualcomm.com
Tue Jul 28 09:23:25 PDT 2015


"John W. Linville" <linville at tuxdriver.com> writes:

> On Tue, Jul 28, 2015 at 10:41:11AM +0530, Vasanthakumar Thiagarajan wrote:
>> On Tuesday 28 July 2015 12:52 AM, John W. Linville wrote:
>> >In ath10k_monitor_vdev_start, chandef is initialized to NULL and then
>> >channel is immediately thereafter initialized to chandef->chan (i.e.
>> >NULL->chan).  This appears to be some sort of cut-n-paste error, since
>> >the same assignment is done later (i.e. after chandef has been properly
>> >assigned to a non-NULL value).  So, let's just remove this "brown paper
>> >bag" typo/thinko... :-)
>> >
>> >Coverity CID #1309505
>> >
>> >Signed-off-by: John W. Linville <linville at tuxdriver.com>

[...]

>> There is a similar change integrated recently,
>> https://github.com/kvalo/ath/commit/19be9e9a7ac7e6050eab426283d2a87593cf6e82
>
> OK.  I don't see much point in the NULL assignment for channel, but the main
> point is to avoide the chandef->chan part.

Yeah, that was an oversight in my review. Want to send a patch to fix
that? :)

-- 
Kalle Valo



More information about the ath10k mailing list