Skip to content

Commit

Permalink
mtd: brcmnand: do not make local variable static
Browse files Browse the repository at this point in the history
Remove static in front of ctrl. This variable should not be shared
between different instances of brcmnand_probe(), it should be local to
this function and stored on the stack.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Hauke Mehrtens authored and Brian Norris committed May 18, 2015
1 parent 8020412 commit bcb83a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/brcmnand/brcmnand.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
{
struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node, *child;
static struct brcmnand_controller *ctrl;
struct brcmnand_controller *ctrl;
struct resource *res;
int ret;

Expand Down

0 comments on commit bcb83a1

Please sign in to comment.