mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 13:14:14 +08:00
audio: Remove not needed NULL pointer checks
g_new0 always returns valid pointer and there is no need to check that.
This commit is contained in:
parent
e2d49cfa89
commit
c1d6620752
@ -1535,8 +1535,6 @@ proceed:
|
||||
int av_err;
|
||||
|
||||
server = g_new0(struct a2dp_server, 1);
|
||||
if (!server)
|
||||
return -ENOMEM;
|
||||
|
||||
av_err = avdtp_init(src, config, &server->version);
|
||||
if (av_err < 0) {
|
||||
|
@ -823,8 +823,6 @@ int avctp_register(const bdaddr_t *src, gboolean master)
|
||||
struct avctp_server *server;
|
||||
|
||||
server = g_new0(struct avctp_server, 1);
|
||||
if (!server)
|
||||
return -ENOMEM;
|
||||
|
||||
server->io = avctp_server_socket(src, master);
|
||||
if (!server->io) {
|
||||
|
@ -3948,8 +3948,6 @@ int avdtp_init(const bdaddr_t *src, GKeyFile *config, uint16_t *version)
|
||||
|
||||
proceed:
|
||||
server = g_new0(struct avdtp_server, 1);
|
||||
if (!server)
|
||||
return -ENOMEM;
|
||||
|
||||
server->version = ver;
|
||||
|
||||
|
@ -1285,8 +1285,6 @@ int avrcp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config)
|
||||
}
|
||||
|
||||
server = g_new0(struct avrcp_server, 1);
|
||||
if (!server)
|
||||
return -ENOMEM;
|
||||
|
||||
record = avrcp_tg_record();
|
||||
if (!record) {
|
||||
|
Loading…
Reference in New Issue
Block a user