From b6dd828445aa3db9503e95863b6dad7483a963a3 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 1 Jul 2022 11:41:34 +0200 Subject: ARM: footbridge: remove leftover from personal-server The machine was removed a while ago, and the checks are now useless. Reviewed-by: Christoph Hellwig Tested-by: Marc Zyngier Signed-off-by: Arnd Bergmann --- drivers/tty/serial/21285.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers') diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c index 7520cc02fd4d..65d6af755567 100644 --- a/drivers/tty/serial/21285.c +++ b/drivers/tty/serial/21285.c @@ -461,9 +461,6 @@ static int __init serial21285_console_setup(struct console *co, char *options) int parity = 'n'; int flow = 'n'; - if (machine_is_personal_server()) - baud = 57600; - /* * Check whether an invalid uart number has been specified, and * if so, search for the first available port that does have -- cgit v1.2.3 From a4d1846512e12f9e84be63b3f2f2165e4d0d2d1e Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König <(address hidden)> Date: Mon, 26 Sep 2022 12:40:11 +0200 Subject: pxa: Drop if with an always false condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The remove callback is only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so ssp is never NULL. Also note that returning an error code from a remove callback doesn't result in the device staying bound. It's still removed and devm callbacks are called. So the memory that ssp pointed to during probe, goes away without the node being removed from ssp_list. The probable result of an early exit is accessing freed memory when the list is walked the next time. Signed-off-by: Uwe Kleine-König <(address hidden)> Signed-off-by: Arnd Bergmann --- drivers/soc/pxa/ssp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c index 563440315acd..93449fb3519e 100644 --- a/drivers/soc/pxa/ssp.c +++ b/drivers/soc/pxa/ssp.c @@ -180,11 +180,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) static int pxa_ssp_remove(struct platform_device *pdev) { - struct ssp_device *ssp; - - ssp = platform_get_drvdata(pdev); - if (ssp == NULL) - return -ENODEV; + struct ssp_device *ssp = platform_get_drvdata(pdev); mutex_lock(&ssp_lock); list_del(&ssp->node); -- cgit v1.2.3