base-files: get_dt_led: don't warn about missing led
authorMathias Kresin <dev@kresin.me>
Wed, 4 Apr 2018 06:38:24 +0000 (08:38 +0200)
committerMathias Kresin <dev@kresin.me>
Wed, 4 Apr 2018 07:12:39 +0000 (09:12 +0200)
It's intentional that some boards within a target don't have all LEDs
which are tried to be setup in a common script. Don't show a warning in
such cases.

Fixes: 4f4fc993db4c ("base-files: add more name source to get_dt_led helper function")
Signed-off-by: Mathias Kresin <dev@kresin.me>
package/base-files/files/lib/functions/leds.sh

index e4423b4cc8d19c2e16039c5a5d643119546c857a..8a1d21caeff382a5bdbb79f492a133ec0a1b31a4 100644 (file)
@@ -10,8 +10,7 @@ get_dt_led() {
        [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
        [ -n "$ledpath" ] && \
                label=$(cat "$basepath$ledpath/label" 2>/dev/null) || \
-               label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null) || \
-               echo "led label not found" 1>&2
+               label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null)
 
        echo "$label"
 }