Patch "clk: ti: dra7-atl: Provide error check for incoming parameters in set_rate" has been added to the 3.16-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clk: ti: dra7-atl: Provide error check for incoming parameters in set_rate

to the 3.16-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clk-ti-dra7-atl-provide-error-check-for-incoming-parameters-in-set_rate.patch
and it can be found in the queue-3.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 20411dad75ece9a613af715df4489e60990c4017 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@xxxxxx>
Date: Mon, 18 Aug 2014 11:56:55 -0500
Subject: clk: ti: dra7-atl: Provide error check for incoming parameters in set_rate

From: Nishanth Menon <nm@xxxxxx>

commit 20411dad75ece9a613af715df4489e60990c4017 upstream.

Check for valid parameters in check rate. Else, we end up getting
errors.

This occurs as part of the inital clock tree update of child clock
nodes where new_rate could be 0 for non functional clocks.

Fixes: 9ac33b0ce81fa48 (" CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
Signed-off-by: Nishanth Menon <nm@xxxxxx>
Signed-off-by: Tero Kristo <t-kristo@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/clk/ti/clk-dra7-atl.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/clk/ti/clk-dra7-atl.c
+++ b/drivers/clk/ti/clk-dra7-atl.c
@@ -139,9 +139,13 @@ static long atl_clk_round_rate(struct cl
 static int atl_clk_set_rate(struct clk_hw *hw, unsigned long rate,
 			    unsigned long parent_rate)
 {
-	struct dra7_atl_desc *cdesc = to_atl_desc(hw);
+	struct dra7_atl_desc *cdesc;
 	u32 divider;
 
+	if (!hw || !rate)
+		return -EINVAL;
+
+	cdesc = to_atl_desc(hw);
 	divider = ((parent_rate + rate / 2) / rate) - 1;
 	if (divider > DRA7_ATL_DIVIDER_MASK)
 		divider = DRA7_ATL_DIVIDER_MASK;


Patches currently in stable-queue which might be from nm@xxxxxx are

queue-3.16/clk-ti-dra7-atl-provide-error-check-for-incoming-parameters-in-set_rate.patch
queue-3.16/arm-dts-dra7-evm-fix-spi1-mux-documentation.patch
queue-3.16/arm-dra7-hwmod-add-dra74x-and-dra72x-specific-ocp-interface-lists.patch
queue-3.16/clk-prevent-erronous-parsing-of-children-during-rate-change.patch
queue-3.16/arm-dts-dra7-fix-interrupt-cells-for-gpio.patch
queue-3.16/clk-ti-divider-provide-error-check-for-incoming-parameters-in-set_rate.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]