hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/reset/tegra/reset-bpmp.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2016 NVIDIA Corporation
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85
96 #include <linux/reset-controller.h>
....@@ -23,6 +20,7 @@
2320 struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
2421 struct mrq_reset_request request;
2522 struct tegra_bpmp_message msg;
23
+ int err;
2624
2725 memset(&request, 0, sizeof(request));
2826 request.cmd = command;
....@@ -33,7 +31,13 @@
3331 msg.tx.data = &request;
3432 msg.tx.size = sizeof(request);
3533
36
- return tegra_bpmp_transfer(bpmp, &msg);
34
+ err = tegra_bpmp_transfer(bpmp, &msg);
35
+ if (err)
36
+ return err;
37
+ if (msg.rx.ret)
38
+ return -EINVAL;
39
+
40
+ return 0;
3741 }
3842
3943 static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,