We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cf5db7 commit ae85dabCopy full SHA for ae85dab
drivers/firmware/thead,th1520-aon.c
@@ -203,6 +203,7 @@ struct th1520_aon_chan *th1520_aon_init(struct device *dev)
203
{
204
struct th1520_aon_chan *aon_chan;
205
struct mbox_client *cl;
206
+ int ret;
207
208
aon_chan = kzalloc(sizeof(*aon_chan), GFP_KERNEL);
209
if (!aon_chan)
@@ -217,8 +218,9 @@ struct th1520_aon_chan *th1520_aon_init(struct device *dev)
217
218
aon_chan->ch = mbox_request_channel_byname(cl, "aon");
219
if (IS_ERR(aon_chan->ch)) {
220
dev_err(dev, "Failed to request aon mbox chan\n");
221
+ ret = PTR_ERR(aon_chan->ch);
222
kfree(aon_chan);
- return ERR_CAST(aon_chan->ch);
223
+ return ERR_PTR(ret);
224
}
225
226
mutex_init(&aon_chan->transaction_lock);
0 commit comments