Skip to content
Commit a4d18465 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Arnd Bergmann
Browse files

pxa: Drop if with an always false condition



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: default avatarArnd Bergmann <arnd@arndb.de>
parent 63872304
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment