On 5/5/20 12:56 PM, Andrii Nakryiko wrote:
+ seq->buf = kmalloc(seq->size, GFP_KERNEL); + if (!seq->buf) + goto Enomem;Why not just mutex_unlock and exit with -ENOMEM? Less goto'ing, more straightforward.
no. please keep kernel coding style. goto is appropriate here.