Merge tag 'v3.14.25' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / i2c / busses / i2c-s3c2410.c
index 684d21e..27303c7 100644 (file)
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
 #include <linux/kernel.h>
@@ -1085,16 +1081,12 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
        }
 
        i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL);
-       if (!i2c) {
-               dev_err(&pdev->dev, "no memory for state\n");
+       if (!i2c)
                return -ENOMEM;
-       }
 
        i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-       if (!i2c->pdata) {
-               dev_err(&pdev->dev, "no memory for platform data\n");
+       if (!i2c->pdata)
                return -ENOMEM;
-       }
 
        i2c->quirks = s3c24xx_get_device_quirks(pdev);
        if (pdata)
@@ -1247,10 +1239,10 @@ static int s3c24xx_i2c_resume(struct device *dev)
        struct platform_device *pdev = to_platform_device(dev);
        struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
 
-       i2c->suspended = 0;
        clk_prepare_enable(i2c->clk);
        s3c24xx_i2c_init(i2c);
        clk_disable_unprepare(i2c->clk);
+       i2c->suspended = 0;
 
        return 0;
 }