mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-10 06:52:53 +00:00
f4c5d0e77e
Cherry-pick patches to support building RP1 modules.
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17233
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 613dd79d5e
)
26 lines
832 B
Diff
26 lines
832 B
Diff
From 3687701e8d252864f440f91f1aedf8ffd58d6ee6 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Mon, 25 Nov 2024 21:51:13 +0000
|
|
Subject: [PATCH] misc: rp1-pio: Fix parameter checks wihout client
|
|
|
|
Passing bad parameters to an API call without a pio pointer will cause
|
|
a NULL pointer exception when the persistent error is set. Guard
|
|
against that.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
include/linux/pio_rp1.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/include/linux/pio_rp1.h
|
|
+++ b/include/linux/pio_rp1.h
|
|
@@ -20,7 +20,7 @@
|
|
#endif
|
|
|
|
#define bad_params_if(client, test) \
|
|
- ({ bool f = (test); if (f) pio_set_error(client, -EINVAL); \
|
|
+ ({ bool f = (test); if (f && client) pio_set_error(client, -EINVAL); \
|
|
if (f && PARAM_WARNINGS_ENABLED) WARN_ON((test)); \
|
|
f; })
|
|
|