diff options
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/flexcan.c | 6 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 1efb08386c61..38c0690df5c8 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/of.h> | 36 | #include <linux/of.h> |
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/pinctrl/consumer.h> | ||
38 | 39 | ||
39 | #define DRV_NAME "flexcan" | 40 | #define DRV_NAME "flexcan" |
40 | 41 | ||
@@ -927,11 +928,16 @@ static int __devinit flexcan_probe(struct platform_device *pdev) | |||
927 | struct flexcan_priv *priv; | 928 | struct flexcan_priv *priv; |
928 | struct resource *mem; | 929 | struct resource *mem; |
929 | struct clk *clk = NULL; | 930 | struct clk *clk = NULL; |
931 | struct pinctrl *pinctrl; | ||
930 | void __iomem *base; | 932 | void __iomem *base; |
931 | resource_size_t mem_size; | 933 | resource_size_t mem_size; |
932 | int err, irq; | 934 | int err, irq; |
933 | u32 clock_freq = 0; | 935 | u32 clock_freq = 0; |
934 | 936 | ||
937 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | ||
938 | if (IS_ERR(pinctrl)) | ||
939 | return PTR_ERR(pinctrl); | ||
940 | |||
935 | if (pdev->dev.of_node) { | 941 | if (pdev->dev.of_node) { |
936 | const u32 *clock_freq_p; | 942 | const u32 *clock_freq_p; |
937 | 943 | ||
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c index 5234586dff15..629c4ba5d49d 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c | |||
@@ -875,6 +875,7 @@ static int pcan_usb_pro_init(struct peak_usb_device *dev) | |||
875 | PCAN_USBPRO_INFO_FW, | 875 | PCAN_USBPRO_INFO_FW, |
876 | &fi, sizeof(fi)); | 876 | &fi, sizeof(fi)); |
877 | if (err) { | 877 | if (err) { |
878 | kfree(usb_if); | ||
878 | dev_err(dev->netdev->dev.parent, | 879 | dev_err(dev->netdev->dev.parent, |
879 | "unable to read %s firmware info (err %d)\n", | 880 | "unable to read %s firmware info (err %d)\n", |
880 | pcan_usb_pro.name, err); | 881 | pcan_usb_pro.name, err); |
@@ -885,6 +886,7 @@ static int pcan_usb_pro_init(struct peak_usb_device *dev) | |||
885 | PCAN_USBPRO_INFO_BL, | 886 | PCAN_USBPRO_INFO_BL, |
886 | &bi, sizeof(bi)); | 887 | &bi, sizeof(bi)); |
887 | if (err) { | 888 | if (err) { |
889 | kfree(usb_if); | ||
888 | dev_err(dev->netdev->dev.parent, | 890 | dev_err(dev->netdev->dev.parent, |
889 | "unable to read %s bootloader info (err %d)\n", | 891 | "unable to read %s bootloader info (err %d)\n", |
890 | pcan_usb_pro.name, err); | 892 | pcan_usb_pro.name, err); |