Re: [PATCH 1/3] tty: hvcs: Drop unnecessary if block

2021-01-20 Thread Tyrel Datwyler
On 1/14/21 9:57 AM, Uwe Kleine-König wrote: > If hvcs_probe() succeeded dev_set_drvdata() is called with a non-NULL > value, and if hvcs_probe() failed hvcs_remove() isn't called. > > So there is no way dev_get_drvdata() can return NULL in hvcs_remove() and > the check can just go away. > > Signe

Re: [PATCH 1/3] tty: hvcs: Drop unnecessary if block

2021-01-15 Thread Jiri Slaby
On 14. 01. 21, 18:57, Uwe Kleine-König wrote: If hvcs_probe() succeeded dev_set_drvdata() is called with a non-NULL value, and if hvcs_probe() failed hvcs_remove() isn't called. So there is no way dev_get_drvdata() can return NULL in hvcs_remove() and the check can just go away. Signed-off-by:

[PATCH 1/3] tty: hvcs: Drop unnecessary if block

2021-01-14 Thread Uwe Kleine-König
If hvcs_probe() succeeded dev_set_drvdata() is called with a non-NULL value, and if hvcs_probe() failed hvcs_remove() isn't called. So there is no way dev_get_drvdata() can return NULL in hvcs_remove() and the check can just go away. Signed-off-by: Uwe Kleine-König --- drivers/tty/hvc/hvcs.c |