]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: initialize variable before logical OR'ing it
authorJay Freyensee <james.p.freyensee@intel.com>
Thu, 21 Jul 2016 03:26:16 +0000 (21:26 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 21 Jul 2016 03:26:16 +0000 (21:26 -0600)
commit714bd90871d4099a0c87741a8af7003a9c352703
tree5a5a12753d91cafc099e9cfcf43816a89fddbdcc
parent278ef7f238b8362e9d61f98f692567dac1aabf42
nvme: initialize variable before logical OR'ing it

It is typically not good coding or secure coding practice
to logical OR a variable without an initialization value first.
Here on this line:

integrity.flags |= BLK_INTEGRITY_DEVICE_CAPABLE;

BLK_INTEGRITY_DEVICE_CAPABLE is being OR'ed to a member variable
never set to an initial value. This patch fixes that.

Signed-off-by: Jay Freyensee <james.p.freyensee@intel.com>
Reviewed-by: Ming Lin <ming.l@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c