diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2019-04-27 22:54:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-30 15:19:03 +0300 |
commit | 87232b827ef793060ed59af36d89ae90a092ac96 (patch) | |
tree | 89db31f79735d1112001e2967d73dcebfbcaf8ae /drivers/staging | |
parent | 7912fd345b111ffd1f6bb5b4f1346ae2e7ce788f (diff) | |
download | linux-87232b827ef793060ed59af36d89ae90a092ac96.tar.xz |
staging: kpc2000_spi: eliminated duplicate initialization of master local variable.
master was being initialized to a particular value and then having the
same value assigned to it immediately afterwards. Removed the
initializer.
Since the value assigned to master was dynamically allocated, this fixes
a memory-leak.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/kpc2000/kpc_spi/spi_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/kpc2000/kpc_spi/spi_driver.c b/drivers/staging/kpc2000/kpc_spi/spi_driver.c index e77f04bf02d9..c0999e080577 100644 --- a/drivers/staging/kpc2000/kpc_spi/spi_driver.c +++ b/drivers/staging/kpc2000/kpc_spi/spi_driver.c @@ -408,7 +408,7 @@ static int kp_spi_probe(struct platform_device *pldev) { struct kpc_core_device_platdata *drvdata; - struct spi_master *master = spi_alloc_master(&pldev->dev, sizeof(struct kp_spi)); + struct spi_master *master; struct kp_spi *kpspi; struct resource *r; int status = 0; |