* [bug report] coresight: etm: Clean up device specific data @ 2019-06-13 6:55 Dan Carpenter 2019-06-13 10:08 ` Suzuki K Poulose 2019-06-13 10:13 ` Dan Carpenter 0 siblings, 2 replies; 3+ messages in thread From: Dan Carpenter @ 2019-06-13 6:55 UTC (permalink / raw) To: kernel-janitors 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 regards, dan carpenter ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug report] coresight: etm: Clean up device specific data 2019-06-13 6:55 [bug report] coresight: etm: Clean up device specific data Dan Carpenter @ 2019-06-13 10:08 ` Suzuki K Poulose 2019-06-13 10:13 ` Dan Carpenter 1 sibling, 0 replies; 3+ messages in thread From: Suzuki K Poulose @ 2019-06-13 10:08 UTC (permalink / raw) To: kernel-janitors 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug report] coresight: etm: Clean up device specific data 2019-06-13 6:55 [bug report] coresight: etm: Clean up device specific data Dan Carpenter 2019-06-13 10:08 ` Suzuki K Poulose @ 2019-06-13 10:13 ` Dan Carpenter 1 sibling, 0 replies; 3+ messages in thread From: Dan Carpenter @ 2019-06-13 10:13 UTC (permalink / raw) To: kernel-janitors Thanks! regards, dan carpenter ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-13 10:13 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-13 6:55 [bug report] coresight: etm: Clean up device specific data Dan Carpenter 2019-06-13 10:08 ` Suzuki K Poulose 2019-06-13 10:13 ` Dan Carpenter
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.