On Mon, Mar 02, 2020 at 09:19:33PM +0000, Chaitanya Kulkarni wrote:
By any chance will the following patch be able to get rid of the warning ?
index 4560878f0bac..889555910555 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1895,9 +1895,7 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev, goto out_unlock_bdev; }
ret = 0;
if (bt == NULL)
ret = blk_trace_setup_queue(q, bdev);
ret = bt == NULL ? blk_trace_setup_queue(q, bdev) : 0; if (ret == 0) { if (attr == &dev_attr_act_mask)
That looks the same thing as what created the warning, just more compact.
I think the right thing to do is update bt to the one allocated from a successful blk_trace_setup_queue().