Commit 782be79
usb: gadget: lpc32xx_udc: fix clock imbalance in error path
A recent change fixing a device reference leak introduced a clock
imbalance by reusing an error path so that the clock may be disabled
before having been enabled.
Note that the clock framework allows for passing in NULL clocks so there
is no risk for a NULL pointer dereference.
Also drop the bogus I2C client NULL check added by the offending commit
as the pointer has already been verified to be non-NULL.
Fixes: c841179 ("USB: lpc32xx_udc: Fix error handling in probe")
Cc: [email protected]
Cc: Ma Ke <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Reviewed-by: Vladimir Zapolskiy <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 5106dba commit 782be79
1 file changed
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3020 | 3020 | | |
3021 | 3021 | | |
3022 | 3022 | | |
3023 | | - | |
| 3023 | + | |
3024 | 3024 | | |
3025 | 3025 | | |
3026 | 3026 | | |
| |||
3040 | 3040 | | |
3041 | 3041 | | |
3042 | 3042 | | |
3043 | | - | |
| 3043 | + | |
3044 | 3044 | | |
3045 | 3045 | | |
3046 | 3046 | | |
3047 | 3047 | | |
3048 | 3048 | | |
3049 | 3049 | | |
3050 | 3050 | | |
3051 | | - | |
| 3051 | + | |
3052 | 3052 | | |
3053 | 3053 | | |
3054 | 3054 | | |
3055 | 3055 | | |
3056 | 3056 | | |
3057 | 3057 | | |
3058 | 3058 | | |
3059 | | - | |
| 3059 | + | |
3060 | 3060 | | |
3061 | 3061 | | |
3062 | 3062 | | |
3063 | 3063 | | |
3064 | 3064 | | |
3065 | 3065 | | |
3066 | | - | |
| 3066 | + | |
3067 | 3067 | | |
3068 | 3068 | | |
3069 | 3069 | | |
| |||
3165 | 3165 | | |
3166 | 3166 | | |
3167 | 3167 | | |
3168 | | - | |
3169 | | - | |
3170 | 3168 | | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
3171 | 3172 | | |
3172 | 3173 | | |
3173 | 3174 | | |
| |||
3195 | 3196 | | |
3196 | 3197 | | |
3197 | 3198 | | |
3198 | | - | |
3199 | | - | |
3200 | | - | |
3201 | 3199 | | |
| 3200 | + | |
| 3201 | + | |
3202 | 3202 | | |
3203 | 3203 | | |
3204 | 3204 | | |
| |||
0 commit comments