Message ID | 20240422214058.3411417-1-denkenz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e16edbd2bb51d2898f72c8e6d22800348ece3fe9 |
Headers | show |
Series | [1/4] qmi: Remove redundant NULL check in qmi_param_new | expand |
Hello: This series was applied to ofono.git (master) by Denis Kenzior <denkenz@gmail.com>: On Mon, 22 Apr 2024 16:40:43 -0500 you wrote: > l_new cannot fail, and thus cannot return NULL. Remove the check and > simplify the code. > --- > drivers/qmimodem/qmi.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) Here is the summary with links: - [1/4] qmi: Remove redundant NULL check in qmi_param_new https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=e16edbd2bb51 - [2/4] qmi: voicecall: Fix up code style violations https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=3c5ed8ec1e57 - [3/4] qmi: voicecall: Remove ternary conditional use https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=231cde4f12a4 - [4/4] qmi: voicecall: Remove redundant initialization to NULL https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=789f68a5fba3 You are awesome, thank you!
diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c index 5032233ec1ec..dfd41317651c 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)