No need to check the argument of i2c_unregister_device() because the function itself does it.
Unified · Split
| @@ -222,8 +222,7 @@ static int tosa_lcd_remove(struct spi_device *spi) · 221 unmodified lines | ||
| 222 | 222 | { |
| 223 | 223 | struct tosa_lcd_data *data = spi_get_drvdata(spi); |
| 224 | 224 | |
| 225 | − if (data->i2c) | |
| 226 | − i2c_unregister_device(data->i2c); | |
| 225 | + i2c_unregister_device(data->i2c); | |
| 227 | 226 | |
| 228 | 227 | tosa_lcd_tg_off(data); |
| 229 | 228 | |