Re: [bug report] coresight: etm: Clean up device specific data

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

 



Hi Dan

On 13/06/2019 07:55, Dan Carpenter wrote:
Hello Suzuki K Poulose,

This is a semi-automatic email about new static checker warnings.

The patch 21d26b905c05: "coresight: etm: Clean up device specific
data" from May 22, 2019, leads to the following Smatch complaint:

     ./drivers/hwtracing/coresight/coresight-etm3x.c:460 etm_get_trace_id()
     warn: variable dereferenced before check 'drvdata' (see line 458)

./drivers/hwtracing/coresight/coresight-etm3x.c
    457		int trace_id = -1;
    458		struct device *etm_dev = drvdata->csdev->dev.parent;
                                          ^^^^^^^^^
New dereference

    459	
    460		if (!drvdata)
                     ^^^^^^^^
Checked too late.  Delete the check?

    461			goto out;
    462	


Thanks for the report. I have sent a patch to fix it.

Cheers
Suzuki



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux