projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14af1df
)
spi: pxa2xx: drv_data can't be NULL in ->remove()
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Mon, 24 Feb 2020 15:45:56 +0000
(17:45 +0200)
committer
Mark Brown
<broonie@kernel.org>
Mon, 24 Feb 2020 22:19:38 +0000
(22:19 +0000)
There is no need for drv_data check against NULL, since it won't happen.
Remove useless check.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link:
https://lore.kernel.org/r/20200224154556.11627-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-pxa2xx.c
b/drivers/spi/spi-pxa2xx.c
index
934bfe2
..
8e8e180
100644
(file)
--- a/
drivers/spi/spi-pxa2xx.c
+++ b/
drivers/spi/spi-pxa2xx.c
@@
-1884,11
+1884,7
@@
out_error_controller_alloc:
static int pxa2xx_spi_remove(struct platform_device *pdev)
{
struct driver_data *drv_data = platform_get_drvdata(pdev);
- struct ssp_device *ssp;
-
- if (!drv_data)
- return 0;
- ssp = drv_data->ssp;
+ struct ssp_device *ssp = drv_data->ssp;
pm_runtime_get_sync(&pdev->dev);