crypto: atmel-sha204a - remove sysfs group before hwrng
PATCH 1/1 crypto: atmel-sha204a - remove sysfs group before hwrng
atmel_sha204a_probe() registers the hwrng before creating the sysfs group. Mirror this order in atmel_sha204a_remove() by removing the sysfs group before unregistering the hwrng.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/crypto/atmel-sha204a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/crypto/atmel-sha204a.c +1 -2
@@ -199,11 +199,10 @@ static void atmel_sha204a_remove(struct i2c_client *client) {struct atmel_i2c_client_priv *i2c_priv =i2c_get_clientdata (client); +sysfs_remove_group (&client->dev.kobj, &atmel_sha204a_groups);devm_hwrng_unregister (&client->dev, &i2c_priv->hwrng);atmel_i2c_flush_queue (); -sysfs_remove_group (&client->dev.kobj, &atmel_sha204a_groups); -kfree ((void *)i2c_priv->hwrng.priv); }
Herbert Xu
maintainerQuoted 8 lines · Thorsten Blum
atmel_sha204a_probe()registers the hwrng before creating the sysfs group. Mirror this order inatmel_sha204a_remove()by removing the sysfs group before unregistering the hwrng.Signed-off-by Thorsten Blum <[email protected]>--- drivers/crypto/atmel-sha204a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt