Skip to content
Commit 74007ae6 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Guenter Roeck
Browse files

hwmon: (xgene) Fix up error handling path mixup in 'xgene_hwmon_probe()'

Commit 2ca492e2 has moved the call to 'kfifo_alloc()' from after the
main 'if' statement to before it.
But it has not updated the error handling paths accordingly.

Fix all that:
   - if 'kfifo_alloc()' fails we can return directly
   - direct returns after 'kfifo_alloc()' must now go to 'out_mbox_free'
   - 'goto out_mbox_free' must be replaced by 'goto out', otherwise the
     '[pcc_]mbox_free_channel()' call will be missed.

Fixes: 2ca492e2

 ("hwmon: (xgene) Fix crash when alarm occurs before driver probe")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 2bd6bf03
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment