summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2021-07-21 20:35:03 +0200
committerVinod Koul <vkoul@kernel.org>2021-07-28 14:25:40 +0200
commit568b2126466f926a10be0b53b40c2d6ae056d8d6 (patch)
treeb6c7ea998d32a7c7c780da9c06b2a8564bbcc26b /drivers/dma
parentdmaengine: idxd: Set defaults for GRPCFG traffic class (diff)
downloadlinux-568b2126466f926a10be0b53b40c2d6ae056d8d6.tar.xz
linux-568b2126466f926a10be0b53b40c2d6ae056d8d6.zip
dmaengine: idxd: fix uninit var for alt_drv
0-day detected uninitialized alt_drv variable in the bind_store() function. The branch can be taken when device is not idxd device or wq 'struct device'. Init alt_drv to NULL. Fixes: 6e7f3ee97bbe ("dmaengine: idxd: move dsa_drv support to compatible mode") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/162689250332.2114335.636367120454420852.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/idxd/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/idxd/compat.c b/drivers/dma/idxd/compat.c
index d67746ee0c1a..d7616c240dcd 100644
--- a/drivers/dma/idxd/compat.c
+++ b/drivers/dma/idxd/compat.c
@@ -34,7 +34,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf, size_t cou
{
struct bus_type *bus = drv->bus;
struct device *dev;
- struct device_driver *alt_drv;
+ struct device_driver *alt_drv = NULL;
int rc = -ENODEV;
struct idxd_dev *idxd_dev;