aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2024-04-22 16:06:02 -0500
committerDenis Kenzior <denkenz@gmail.com>2024-04-22 16:06:02 -0500
commite16edbd2bb51d2898f72c8e6d22800348ece3fe9 (patch)
tree9941f6f39e77458ac51424f5be2d84b4ea1a0472
parent752d286a5ce3efc28a6b8a4c4dffb44d23d8d15b (diff)
downloadofono-e16edbd2bb51d2898f72c8e6d22800348ece3fe9.tar.gz
qmi: Remove redundant NULL check in qmi_param_new
l_new cannot fail, and thus cannot return NULL. Remove the check and simplify the code.
-rw-r--r--drivers/qmimodem/qmi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 5032233ec..dfd413176 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -2345,13 +2345,7 @@ struct qmi_device *qmi_device_new_qrtr(void)
struct qmi_param *qmi_param_new(void)
{
- struct qmi_param *param;
-
- param = l_new(struct qmi_param, 1);
- if (!param)
- return NULL;
-
- return param;
+ return l_new(struct qmi_param, 1);
}
void qmi_param_free(struct qmi_param *param)