From: Takashi Iwai <tiwai@suse.de>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Cc: perex@perex.cz, tiwai@suse.de, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org
Subject: Re: [PATCH] sound: core: Check return value of device_create()
Date: Tue, 24 Nov 2026 13:52:14 +0100 [thread overview]
Message-ID: <87qzga9ytd.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261123100535.3025-1-sreekuttan2156239@gmail.com>
On Mon, 23 Nov 2026 11:05:35 +0100,
Sreeraj S Kurup wrote:
>
> The sound_insert_unit() function ignores the return value of
> device_create(). If device creation fails, the function still
> returns the allocated minor number as if registration succeeded.
>
> Add a helper function, sound_device_create(), to create the sound
> device and check the return value using PTR_ERR_OR_ZERO().
>
> If device creation fails, remove the allocated sound unit from
> the sound loader list, unregister the character device when
> preclaim_oss is disabled, and free the allocated memory.
>
> Return the original error code to the caller instead of reporting
> successful registration.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Applied to for-next branch. Thanks.
Takashi
prev parent reply other threads:[~2026-11-24 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 10:05 Sreeraj S Kurup
2026-11-24 12:52 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87qzga9ytd.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sreekuttan2156239@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®