Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jul 2017 19:42:07 +0000 (12:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jul 2017 19:42:07 +0000 (12:42 -0700)
Pull key handling fixes from James Morris:
 "A minor fix and documentation updates"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  KEYS: Add documentation for asymmetric keyring restrictions
  KEYS: DH: validate __spare field
  modsign: add markers to endif-statements in certs/Makefile

arch/arm/kernel/bios32.c
drivers/pci/host/pcie-rockchip.c
fs/befs/btree.c
include/linux/clk.h

index 56dc1a3a33b4347867a05341cbb35cd5ff9c2e99..c1809fb549ddde428f8bec226c4c7106b89ab240 100644 (file)
@@ -480,7 +480,7 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
 
                        ret = pcibios_init_resource(nr, sys, hw->io_optional);
                        if (ret)  {
-                               kfree(sys);
+                               pci_free_host_bridge(bridge);
                                break;
                        }
 
index 5acf8694fb23bc41d6000c27ae43c425fe478f8a..7bb9870f6d8ce0bd001529ef4c8dba1659e624a1 100644 (file)
@@ -1483,7 +1483,7 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
        bridge->swizzle_irq = pci_common_swizzle;
 
        err = pci_scan_root_bus_bridge(bridge);
-       if (!err)
+       if (err < 0)
                goto err_free_res;
 
        bus = bridge->bus;
index d509887c580ceedba9ab003cb390417aeab993e9..1b7e0f7128d6daa1ba009a9a7868fbb81ec5b039 100644 (file)
@@ -120,18 +120,15 @@ static int befs_compare_strings(const void *key1, int keylen1,
                                const void *key2, int keylen2);
 
 /**
- * befs_bt_read_super - read in btree superblock convert to cpu byteorder
- * @sb: Filesystem superblock
- * @ds: Datastream to read from
- * @sup: Buffer in which to place the btree superblock
+ * befs_bt_read_super() - read in btree superblock convert to cpu byteorder
+ * @sb:        Filesystem superblock
+ * @ds:        Datastream to read from
+ * @sup:       Buffer in which to place the btree superblock
  *
  * Calls befs_read_datastream to read in the btree superblock and
  * makes sure it is in cpu byteorder, byteswapping if necessary.
- *
- * On success, returns BEFS_OK and *@sup contains the btree superblock,
- * in cpu byte order.
- *
- * On failure, BEFS_ERR is returned.
+ * Return: BEFS_OK on success and if *@sup contains the btree superblock in cpu
+ * byte order. Otherwise return BEFS_ERR on error.
  */
 static int
 befs_bt_read_super(struct super_block *sb, const befs_data_stream *ds,
index 91bd464f4c9b1c61d9e929f124a980cb1b370856..12c96d94d1faf2ee7cc9909b0d54ffd96bd8eda6 100644 (file)
@@ -657,6 +657,28 @@ static inline void clk_disable_unprepare(struct clk *clk)
        clk_unprepare(clk);
 }
 
+static inline int clk_bulk_prepare_enable(int num_clks,
+                                         struct clk_bulk_data *clks)
+{
+       int ret;
+
+       ret = clk_bulk_prepare(num_clks, clks);
+       if (ret)
+               return ret;
+       ret = clk_bulk_enable(num_clks, clks);
+       if (ret)
+               clk_bulk_unprepare(num_clks, clks);
+
+       return ret;
+}
+
+static inline void clk_bulk_disable_unprepare(int num_clks,
+                                             struct clk_bulk_data *clks)
+{
+       clk_bulk_disable(num_clks, clks);
+       clk_bulk_unprepare(num_clks, clks);
+}
+
 #if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
 struct clk *of_clk_get(struct device_node *np, int index);
 struct clk *of_clk_get_by_name(struct device_node *np, const char *name);